File tree Expand file tree Collapse file tree 1 file changed +25
-24
lines changed
Expand file tree Collapse file tree 1 file changed +25
-24
lines changed Original file line number Diff line number Diff line change 1- name : website
1+ name : Deploy Website
22
33on :
44 push :
55 branches : [website]
6+ # Allows you to run this workflow manually from the Actions tab
7+ workflow_dispatch :
68
79jobs :
810 checks :
@@ -24,32 +26,31 @@ jobs:
2426 gh-release :
2527 if : github.event_name != 'pull_request'
2628 runs-on : ubuntu-latest
29+ permissions :
30+ contents : read
31+ pages : write
32+ id-token : write
33+ environment :
34+ name : github-pages
35+ url : ${{ steps.deployment.outputs.page_url }}
2736 steps :
28- - uses : actions/checkout@v3
29- - uses : actions/setup-node@v3
37+ - name : Checkout
38+ uses : actions/checkout@v3
39+ - name : Setup Node.js
40+ uses : actions/setup-node@v3
3041 with :
3142 node-version : ' 20.x'
3243 cache : ' yarn'
33- - name : Add key to allow access to repository
34- env :
35- SSH_AUTH_SOCK : /tmp/ssh_agent.sock
36- run : |
37- mkdir -p ~/.ssh
38- ssh-keyscan github.com >> ~/.ssh/known_hosts
39- echo "${{ secrets.GH_PAGES_DEPLOY }}" > ~/.ssh/id_rsa
40- chmod 600 ~/.ssh/id_rsa
41- cat <<EOT >> ~/.ssh/config
42- Host github.com
43- HostName github.com
44- IdentityFile ~/.ssh/id_rsa
45- EOT
4644 - name : Install dependencies
4745 run : yarn install --frozen-lockfile
48- - name : Release to GitHub Pages
49- env :
50- USE_SSH : true
51- GIT_USER : git
52- run : |
53- git config --global user.email "[email protected] " 54- git config --global user.name "gh-actions"
55- yarn docusaurus deploy
46+ - name : Build website
47+ run : yarn build
48+ - name : Setup Pages
49+ uses : actions/configure-pages@v3
50+ - name : Upload artifact
51+ uses : actions/upload-pages-artifact@v2
52+ with :
53+ path : ' ./build'
54+ - name : Deploy to GitHub Pages
55+ id : deployment
56+ uses : actions/deploy-pages@v2
You can’t perform that action at this time.
0 commit comments