1- name : " Build and Deploy"
1+ # This workflow uses actions that are not certified by GitHub.
2+ # They are provided by a third-party and are governed by
3+ # separate terms of service, privacy policy, and support
4+ # documentation.
5+
6+ # Sample workflow for building and deploying a Jekyll site to GitHub Pages
7+ name : Deploy Jekyll site to Pages
8+
29on :
10+ # Runs on pushes targeting the default branch
311 push :
4- branches :
5- - main
6- - master
7- paths-ignore :
8- - .gitignore
9- - README.md
10- - LICENSE
12+ branches : ["main"]
1113
1214 # Allows you to run this workflow manually from the Actions tab
1315 workflow_dispatch :
1416
17+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1518permissions :
1619 contents : read
1720 pages : write
1821 id-token : write
1922
20- # Allow one concurrent deployment
23+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
24+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2125concurrency :
2226 group : " pages"
23- cancel-in-progress : true
27+ cancel-in-progress : false
2428
2529jobs :
2630 build :
2731 runs-on : ubuntu-latest
28-
32+
2933 steps :
3034 - name : Checkout
3135 uses : actions/checkout@v4
32- with :
33- fetch-depth : 0
34- # submodules: true
35- # If using the 'assets' git submodule from Chirpy Starter, uncomment above
36- # (See: https://github.com/cotes2020/chirpy-starter/tree/main/assets)
37-
38- - name : Setup Pages
39- id : pages
40- uses : actions/configure-pages@v4
4136
4237 - name : Setup Ruby
4338 uses : ruby/setup-ruby@v1
4439 with :
4540 ruby-version : 3.3
4641 bundler-cache : true
4742
48- - name : Build site
49- run : bundle exec jekyll b -d "_site${{ steps.pages.outputs.base_path }}"
43+ - name : Setup Pages
44+ id : pages
45+ uses : actions/configure-pages@v5
46+
47+ - name : Build with Jekyll
48+ # Outputs to the './_site' directory by default
49+ run : bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
5050 env :
51- JEKYLL_ENV : " production"
52-
53- - name : Test site
54- run : |
55- bundle exec htmlproofer _site \
56- \-\-disable-external \
57- \-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"
58-
59- - name : Upload site artifact
51+ JEKYLL_ENV : production
52+
53+ - name : Upload artifact
54+ # Automatically uploads an artifact from the './_site' directory by default
6055 uses : actions/upload-pages-artifact@v3
61- with :
62- path : " _site${{ steps.pages.outputs.base_path }}"
6356
57+ # Deployment job
6458 deploy :
6559 environment :
6660 name : github-pages
7064 steps :
7165 - name : Deploy to GitHub Pages
7266 id : deployment
73- uses : actions/deploy-pages@v4
67+ uses : actions/deploy-pages@v4
0 commit comments