File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,8 +2,22 @@ name: Deploy
22
33on :
44 push :
5- branches :
6- - main
5+ branches : ["main"]
6+
7+ # Allows you to run this workflow manually from the Actions tab
8+ workflow_dispatch :
9+
10+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
11+ permissions :
12+ contents : read
13+ pages : write
14+ id-token : write
15+
16+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
17+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
18+ concurrency :
19+ group : " pages"
20+ cancel-in-progress : false
721
822jobs :
923 build :
@@ -30,21 +44,11 @@ jobs:
3044 path : book/
3145
3246 deploy :
33- # Add a dependency to the build job
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
4247 environment :
4348 name : github-pages
4449 url : ${{ steps.deployment.outputs.page_url }}
45-
46- # Specify runner + deployment step
4750 runs-on : ubuntu-latest
51+ needs : build
4852 steps :
4953 - name : Deploy to GitHub Pages
5054 id : deployment
Original file line number Diff line number Diff line change 2222 - name : Build 🔨
2323 run : |
2424 ./wrapper.sh build
25+
26+ - name : Upload static files as artifact
27+ id : deployment
28+ uses : actions/upload-pages-artifact@v3
29+ with :
30+ path : book/
You can’t perform that action at this time.
0 commit comments