Skip to content

Commit 86fe3de

Browse files
committed
from document yaml
1 parent 18e4292 commit 86fe3de

File tree

1 file changed

+30
-21
lines changed

1 file changed

+30
-21
lines changed

.github/workflows/depoly-page.yml

+30-21
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,44 @@ on:
88
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
99

1010
jobs:
11-
deploy:
12-
name: Deploy to GitHub Pages
11+
build:
12+
name: Build Docusaurus
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v2
16-
- uses: actions/setup-node@v3
15+
- uses: actions/checkout@v4
1716
with:
18-
node-version: 18.x
17+
fetch-depth: 0
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 18
1921
cache: yarn
2022

2123
- name: Install dependencies
2224
run: yarn install --frozen-lockfile
23-
- name: Build slides
24-
run: yarn reveal
2525
- name: Build website
2626
run: yarn build
2727

28-
# Popular action to deploy to GitHub Pages:
29-
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
30-
- name: Deploy to GitHub Pages
31-
uses: peaceiris/actions-gh-pages@v3
28+
- name: Upload Build Artifact
29+
uses: actions/upload-pages-artifact@v3
3230
with:
33-
github_token: ${{ secrets.GITHUB_TOKEN }}
34-
# Build output to publish to the `gh-pages` branch:
35-
publish_dir: ./build
36-
# The following lines assign commit authorship to the official
37-
# GH-Actions bot for deploys to `gh-pages` branch:
38-
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
39-
# The GH actions bot is used by default if you didn't specify the two fields.
40-
# You can swap them out with your own user credentials.
41-
user_name: github-actions[bot]
42-
user_email: 41898282+github-actions[bot]@users.noreply.github.com
31+
path: build
32+
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
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
46+
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)