File tree Expand file tree Collapse file tree 1 file changed +10
-27
lines changed
Expand file tree Collapse file tree 1 file changed +10
-27
lines changed Original file line number Diff line number Diff line change 1- name : Deploy to GitHub Pages
1+ name : Deploy to GitHub Pages (with PAT)
22
33on :
44 push :
55 branches :
66 - main
7- # You can further define triggers if needed
8- # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
97
108jobs :
11- build :
12- name : Build Docusaurus Site
9+ build-deploy :
1310 runs-on : ubuntu-latest
1411 steps :
15- # Checkout the repository
12+ # Checkout source repo
1613 - uses : actions/checkout@v4
1714 with :
1815 fetch-depth : 0
1916
20- # Set up Node.js
17+ # Setup Node.js
2118 - uses : actions/setup-node@v4
2219 with :
2320 node-version : 18
@@ -31,25 +28,11 @@ jobs:
3128 - name : Build website
3229 run : yarn build
3330
34- # Upload the build folder for deployment
35- - name : Upload Build Artifact
36- uses : actions/upload-pages-artifact@v3
37- with :
38- path : build
39-
40- deploy :
41- name : Deploy to GitHub Pages
42- needs : build
43- runs-on : ubuntu-latest
44- steps :
45- # Deploy to GitHub Pages using PAT
31+ # Deploy using PAT to gh-pages branch
4632 - name : Deploy to GitHub Pages
47- id : deployment
48- uses : actions/deploy-pages@v4
33+ uses : peaceiris/actions-gh-pages@v3
4934 with :
50- token : ${{ secrets.GH_PAT }} # <-- Use your PAT here
51-
52- # Optional: specify environment for Pages
53- environment :
54- name : github-pages
55- url : ${{ steps.deployment.outputs.page_url }}
35+ personal_token : ${{ secrets.GH_PAT }} # PAT secret
36+ publish_dir : ./build
37+ external_repository : <USERNAME>/<TARGET_REPO> # e.g. org/docs-site
38+ publish_branch : gh-pages
You can’t perform that action at this time.
0 commit comments