Skip to content

Commit c437b5b

Browse files
committed
updated github action
1 parent 04be596 commit c437b5b

File tree

1 file changed

+28
-25
lines changed

1 file changed

+28
-25
lines changed
Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# 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
33

44
on:
55
# Runs on pushes targeting the default branch
@@ -22,32 +22,35 @@ concurrency:
2222
cancel-in-progress: false
2323

2424
jobs:
25-
# Build job
26-
build:
25+
deploy:
26+
name: Deploy to GitHub Pages
2727
runs-on: ubuntu-latest
2828
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
3531
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
4234

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
5144
- 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

Comments
 (0)