File tree Expand file tree Collapse file tree 1 file changed +28
-8
lines changed
Expand file tree Collapse file tree 1 file changed +28
-8
lines changed Original file line number Diff line number Diff line change 66 - main # Set a branch to deploy
77 pull_request :
88
9+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
10+ permissions :
11+ contents : read
12+ pages : write
13+ id-token : write
14+
15+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
16+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
17+ concurrency :
18+ group : " pages"
19+ cancel-in-progress : false
20+
921jobs :
10- deploy :
22+ # Build job
23+ build :
1124 runs-on : ubuntu-20.04
12- concurrency :
13- group : ${{ github.workflow }}-${{ github.ref }}
1425 steps :
1526 - uses : actions/checkout@v2
1627 with :
@@ -26,10 +37,19 @@ jobs:
2637 - name : Build
2738 run : hugo --minify
2839
29- - name : Deploy
30- uses : peaceiris/actions-gh-pages@v3
31- if : ${{ github.ref == 'refs/heads/main' }}
40+ - name : Upload artifact
41+ uses : actions/upload-pages-artifact@v2
3242 with :
33- github_token : ${{ secrets.GITHUB_TOKEN }}
34- publish_dir : ./public
43+ path : ./public
3544
45+ # Deployment job
46+ deploy :
47+ environment :
48+ name : github-pages
49+ url : ${{ steps.deployment.outputs.page_url }}
50+ runs-on : ubuntu-latest
51+ needs : build
52+ steps :
53+ - name : Deploy to GitHub Pages
54+ id : deployment
55+ uses : actions/deploy-pages@v2
You can’t perform that action at this time.
0 commit comments