@@ -3,19 +3,16 @@ name: Deploy Jekyll site to Pages
33on :
44 # Runs on pushes targeting the default branch
55 push :
6- branches : ["main", "master"] # Added master branch to catch both naming conventions
7-
8- # Allows you to run this workflow manually from the Actions tab
6+ branches : ["main", "master"]
97 workflow_dispatch :
108
119# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1210permissions :
13- contents : read
11+ contents : write
1412 pages : write
1513 id-token : write
1614
17- # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
18- # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
15+ # Allow one concurrent deployment
1916concurrency :
2017 group : " pages"
2118 cancel-in-progress : false
@@ -26,34 +23,41 @@ jobs:
2623 runs-on : ubuntu-latest
2724 steps :
2825 - name : Checkout
29- uses : actions/checkout@v4
26+ uses : actions/checkout@v3
27+
3028 - name : Setup Ruby
31- uses : ruby/setup-ruby@v1 # Changed to v1 for better compatibility
29+ uses : ruby/setup-ruby@v1
3230 with :
3331 ruby-version : ' 3.1'
3432 bundler-cache : true
33+
3534 - name : Setup Pages
36- id : pages
37- uses : actions/configure-pages@v4 # Downgraded to v4 for stability
35+ uses : actions/configure- pages@v3
36+
3837 - name : Build with Jekyll
39- # Outputs to the './_site' directory by default
40- run : |
41- bundle install
42- bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
38+ run : bundle exec jekyll build
4339 env :
4440 JEKYLL_ENV : production
45- - name : Upload artifact
46- # Automatically uploads an artifact from the './_site' directory by default
47- uses : actions/upload-pages-artifact@v3 # Using v2 for better compatibility
41+
42+ - name : Upload Pages artifact
43+ uses : actions/upload-pages-artifact@v1
4844
49- # Deployment job
45+ # Deploy job
5046 deploy :
47+ needs : build
48+ runs-on : ubuntu-latest
49+
50+ # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
51+ permissions :
52+ pages : write # to deploy to Pages
53+ id-token : write # to verify the deployment originates from an appropriate source
54+
55+ # Deploy to the github-pages environment
5156 environment :
5257 name : github-pages
5358 url : ${{ steps.deployment.outputs.page_url }}
54- runs-on : ubuntu-latest
55- needs : build
59+
5660 steps :
5761 - name : Deploy to GitHub Pages
5862 id : deployment
59- uses : actions/deploy-pages@v3 # Downgraded to v3 for stability
63+ uses : actions/deploy-pages@v2
0 commit comments