File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616
1717# Sets permissions of the GITHUB_TOKEN to allow pushing to gh-pages
1818permissions :
19- contents : write
19+ contents : read
20+ pages : write
21+ id-token : write
2022
2123# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
2224# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
@@ -25,7 +27,7 @@ concurrency:
2527 cancel-in-progress : false
2628
2729jobs :
28- build-and-deploy :
30+ build :
2931 runs-on : ubuntu-latest
3032 steps :
3133 - name : Checkout
@@ -38,15 +40,28 @@ jobs:
3840 bundler-cache : true
3941 cache-version : 0
4042
43+ - name : Setup Pages
44+ id : pages
45+ uses : actions/configure-pages@v5
46+
4147 - name : Build with Jekyll
42- run : bundle exec jekyll build
48+ # Outputs to the './_site' directory by default
49+ run : bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
4350 env :
4451 JEKYLL_ENV : production
4552
46- - name : Deploy to gh-pages
47- uses : peaceiris/actions-gh-pages@v4
48- with :
49- github_token : ${{ secrets.GITHUB_TOKEN }}
50- publish_dir : ./_site
51- keep_files : true
52- publish_branch : gh-pages
53+ - name : Upload artifact
54+ # Automatically uploads an artifact from the './_site' directory by default
55+ uses : actions/upload-pages-artifact@v3
56+
57+ # Deployment job
58+ deploy :
59+ environment :
60+ name : github-pages
61+ url : ${{ steps.deployment.outputs.page_url }}
62+ runs-on : ubuntu-latest
63+ needs : build
64+ steps :
65+ - name : Deploy to GitHub Pages
66+ id : deployment
67+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments