Skip to content

Commit 0da773d

Browse files
committed
ci
1 parent 947b00d commit 0da773d

File tree

3 files changed

+106
-0
lines changed

3 files changed

+106
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Build Docs
2+
description: Build docs pages inside /docs directory
3+
4+
runs:
5+
using: 'composite'
6+
steps:
7+
- name: Install dependencies
8+
run: bun install
9+
shell: bash
10+
11+
- name: Build with Next.js
12+
run: bun next build
13+
shell: bash
14+
15+
- name: Export static HTML with Next.js
16+
run: bun next export
17+
shell: bash

.github/workflows/check.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Validate merge requests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
validate:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
- uses: oven-sh/setup-bun@v2
15+
- uses: ./.github/actions/build-docs

.github/workflows/nextjs.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Sample workflow for building and deploying a Next.js site to GitHub Pages
2+
#
3+
# To get started with Next.js see: https://nextjs.org/docs/getting-started
4+
#
5+
name: Deploy Next.js site to Pages
6+
7+
# TODO: Implement matrix for different node versions and next versions testing
8+
9+
on:
10+
# Runs on pushes targeting the default branch
11+
push:
12+
branches:
13+
- main
14+
15+
# Allows you to run this workflow manually from the Actions tab
16+
workflow_dispatch:
17+
18+
env:
19+
working-directory: docs
20+
21+
defaults:
22+
run:
23+
working-directory: docs
24+
25+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
26+
permissions:
27+
contents: read
28+
pages: write
29+
id-token: write
30+
31+
# Allow one concurrent deployment
32+
concurrency:
33+
group: 'pages'
34+
cancel-in-progress: true
35+
36+
jobs:
37+
# Build job
38+
build:
39+
runs-on: ubuntu-latest
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v3
43+
- uses: oven-sh/setup-bun@v2
44+
- name: Setup Pages
45+
uses: actions/configure-pages@v2
46+
with:
47+
# Automatically inject basePath in your Next.js configuration file and disable
48+
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
49+
#
50+
# You may remove this line if you want to manage the configuration yourself.
51+
static_site_generator: next
52+
53+
- name: Install dependencies
54+
run: bun install
55+
- name: Build with Next.js
56+
run: bun next build
57+
- name: Static HTML export with Next.js
58+
run: bun next export
59+
- name: Upload artifact
60+
uses: actions/upload-pages-artifact@v1
61+
with:
62+
path: ./${{ env.working-directory }}/out
63+
64+
# Deployment job
65+
deploy:
66+
environment:
67+
name: github-pages
68+
url: ${{ steps.deployment.outputs.page_url }}
69+
runs-on: ubuntu-latest
70+
needs: build
71+
steps:
72+
- name: Deploy to GitHub Pages
73+
id: deployment
74+
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)