1
1
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
2
- name : Deploy Jekyll with GitHub Pages dependencies preinstalled
2
+ name : 6 - Deploy docs to GitHub Pages
3
3
4
4
on :
5
5
# Runs on pushes targeting the default branch
@@ -22,32 +22,35 @@ concurrency:
22
22
cancel-in-progress : false
23
23
24
24
jobs :
25
- # Build job
26
- build :
25
+ deploy :
26
+ name : Deploy to GitHub Pages
27
27
runs-on : ubuntu-latest
28
28
steps :
29
- - name : Checkout
30
- uses : actions/checkout@v4
31
- - name : Setup Pages
32
- uses : actions/configure-pages@v4
33
- - name : Build with Jekyll
34
- uses : actions/jekyll-build-pages@v1
29
+ - uses : actions/checkout@v2
30
+ - uses : actions/setup-node@v3
35
31
with :
36
- source : ./casdk-docs/
37
- destination : ./_site
38
- - name : Upload artifact
39
- uses : actions/upload-pages-artifact@v2
40
- with :
41
- path : ./_site
32
+ node-version : 18
33
+ cache : yarn
42
34
43
- # Deployment job
44
- deploy :
45
- environment :
46
- name : github-pages
47
- url : ${{ steps.deployment.outputs.page_url }}
48
- runs-on : ubuntu-latest
49
- needs : build
50
- steps :
35
+ - name : Install dependencies
36
+ run : yarn install --frozen-lockfile
37
+ working-directory : ./casdk-docs
38
+ - name : Build website
39
+ run : yarn build
40
+ working-directory : ./casdk-docs
41
+
42
+ # Popular action to deploy to GitHub Pages:
43
+ # Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
51
44
- name : Deploy to GitHub Pages
52
- id : deployment
53
- uses : actions/deploy-pages@v3
45
+ uses : peaceiris/actions-gh-pages@v3
46
+ with :
47
+ github_token : ${{ secrets.GITHUB_TOKEN }}
48
+ # Build output to publish to the `gh-pages` branch:
49
+ publish_dir : ./casdk-docs/build
50
+ # The following lines assign commit authorship to the official
51
+ # GH-Actions bot for deploys to `gh-pages` branch:
52
+ # https://github.com/actions/checkout/issues/13#issuecomment-724415212
53
+ # The GH actions bot is used by default if you didn't specify the two fields.
54
+ # You can swap them out with your own user credentials.
55
+ user_name : github-actions[bot]
56
+ user_email : 41898282+github-actions[bot]@users.noreply.github.com
0 commit comments