1
- name : Deploy to Pages
1
+ name : Deploy to GitHub Pages
2
2
3
3
on :
4
- # Runs on pushes targeting the default branch
5
4
push :
6
- branches : ["main"]
7
-
8
- # Allows you to run this workflow manually from the Actions tab
9
- workflow_dispatch :
10
-
11
- # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12
- permissions :
13
- contents : read
14
- pages : write
15
- id-token : write
16
-
17
- # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
18
- # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
19
- concurrency :
20
- group : " pages"
21
- cancel-in-progress : false
22
-
23
- # Default to bash
24
- defaults :
25
- run :
26
- shell : bash
5
+ branches :
6
+ - main
7
+ # Review gh actions docs if you want to further define triggers, paths, etc
8
+ # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
27
9
28
10
jobs :
29
- # Build job
30
11
build :
12
+ name : Build Docusaurus
31
13
runs-on : ubuntu-latest
32
- env :
33
- ZOLA_VERSION : " 0.19.1"
34
14
steps :
35
- - name : Install Zola
36
- run : |
37
- set -x
38
- wget -O - \
39
- "https://github.com/getzola/zola/releases/download/v${ZOLA_VERSION}/zola-v${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz" \
40
- | sudo tar xzf - -C /usr/local/bin
41
- - name : Checkout
42
- uses : actions/checkout@v3
15
+ - uses : actions/checkout@v4
16
+ with :
17
+ fetch-depth : 0
18
+ - uses : actions/setup-node@v4
43
19
with :
44
- submodules : recursive
45
- - name : Setup Pages
46
- id : pages
47
- uses : actions/configure-pages@v3
48
- - name : Build with Zola
49
- run : |
50
- zola build
51
- - name : Upload artifact
52
- uses : actions/upload-pages-artifact@v1
20
+ node-version : 18
21
+ cache : yarn
22
+
23
+ - name : Install dependencies
24
+ run : yarn install --frozen-lockfile
25
+ - name : Build website
26
+ run : yarn build
27
+
28
+ - name : Upload Build Artifact
29
+ uses : actions/upload-pages-artifact@v3
53
30
with :
54
- path : ./public
31
+ path : build
55
32
56
- # Deployment job
57
33
deploy :
34
+ name : Deploy to GitHub Pages
35
+ needs : build
36
+
37
+ # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
38
+ permissions :
39
+ pages : write # to deploy to Pages
40
+ id-token : write # to verify the deployment originates from an appropriate source
41
+
42
+ # Deploy to the github-pages environment
58
43
environment :
59
44
name : github-pages
60
45
url : ${{ steps.deployment.outputs.page_url }}
46
+
61
47
runs-on : ubuntu-latest
62
- needs : build
63
48
steps :
64
49
- name : Deploy to GitHub Pages
65
50
id : deployment
66
- uses : actions/deploy-pages@v2
51
+ uses : actions/deploy-pages@v4
0 commit comments