1- name : Deploy Jekyll with GitHub Pages dependencies preinstalled
1+ # Sample workflow for building and deploying a Jekyll site to GitHub Pages
2+ name : Deploy Jekyll site to Pages
23
34on :
4- # Runs on pushes targeting the default branch
55 push :
6- branches : ["main"]
6+ branches :
7+ - " main"
8+ paths :
9+ - " docs/**"
710
811 # Allows you to run this workflow manually from the Actions tab
912 workflow_dispatch :
@@ -14,28 +17,41 @@ permissions:
1417 pages : write
1518 id-token : write
1619
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.
20+ # Allow one concurrent deployment
1921concurrency :
2022 group : " pages"
21- cancel-in-progress : false
23+ cancel-in-progress : true
2224
2325jobs :
2426 # Build job
2527 build :
2628 runs-on : ubuntu-latest
29+ defaults :
30+ run :
31+ working-directory : docs
2732 steps :
2833 - name : Checkout
2934 uses : actions/checkout@v4
35+ - name : Setup Ruby
36+ uses : ruby/setup-ruby@v1
37+ with :
38+ ruby-version : ' 3.3' # Not needed with a .ruby-version file
39+ bundler-cache : true # runs 'bundle install' and caches installed gems automatically
40+ cache-version : 0 # Increment this number if you need to re-download cached gems
41+ working-directory : ' ${{ github.workspace }}/docs'
3042 - name : Setup Pages
43+ id : pages
3144 uses : actions/configure-pages@v5
3245 - name : Build with Jekyll
33- uses : actions/jekyll-build-pages@v1
34- with :
35- source : ./docs
36- destination : ./_site
46+ # Outputs to the './_site' directory by default
47+ run : bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
48+ env :
49+ JEKYLL_ENV : production
3750 - name : Upload artifact
51+ # Automatically uploads an artifact from the './_site' directory by default
3852 uses : actions/upload-pages-artifact@v3
53+ with :
54+ path : docs/_site/
3955
4056 # Deployment job
4157 deploy :
0 commit comments