File tree Expand file tree Collapse file tree 1 file changed +29
-12
lines changed
Expand file tree Collapse file tree 1 file changed +29
-12
lines changed Original file line number Diff line number Diff line change 44 push :
55 branches :
66 - 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
7+ workflow_dispatch : {}
98
109jobs :
11- deploy :
12- name : Deploy to GitHub Pages
10+ build :
11+ name : Build Docusaurus
1312 runs-on : ubuntu-latest
1413 steps :
1514 - uses : actions/checkout@v4
16- - uses : actions/setup-node@v3
15+ with :
16+ fetch-depth : 0
17+ - uses : actions/setup-node@v4
1718 with :
1819 node-version : 20
1920 cache : npm
@@ -23,11 +24,27 @@ jobs:
2324 - name : Build website
2425 run : npm run build
2526
26- # Popular action to deploy to GitHub Pages:
27- # Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
28- - name : Deploy to GitHub Pages
29- uses : peaceiris/actions-gh-pages@v3
27+ - name : Upload Build Artifact
28+ uses : actions/upload-pages-artifact@v3
3029 with :
31- github_token : ${{ secrets.GH_TOKEN }}
32- # Build output to publish to the `gh-pages` branch:
33- publish_dir : ./build
30+ path : build
31+
32+ deploy :
33+ name : Deploy to GitHub Pages
34+ needs : build
35+
36+ # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
37+ permissions :
38+ pages : write # to deploy to Pages
39+ id-token : write # to verify the deployment originates from an appropriate source
40+
41+ # Deploy to the github-pages environment
42+ environment :
43+ name : github-pages
44+ url : ${{ steps.deployment.outputs.page_url }}
45+
46+ runs-on : ubuntu-latest
47+ steps :
48+ - name : Deploy to GitHub Pages
49+ id : deployment
50+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments