1- # Sample workflow for building and deploying a Jekyll site to GitHub Pages
2- name : Deploy Jekyll with GitHub Pages depename: "Build and Deploy"
1+ name : Deploy Jekyll site to Pages
2+
33on :
44 push :
5- branches :
6- - main
7- paths-ignore :
8- - .gitignore
9- - README.md
10- - LICENSE
5+ branches : ["main"]
6+ workflow_dispatch :
117
128permissions :
139 contents : read
@@ -16,96 +12,44 @@ permissions:
1612
1713concurrency :
1814 group : " pages"
19- cancel-in-progress : true
15+ cancel-in-progress : false
2016
2117jobs :
2218 build :
2319 runs-on : ubuntu-latest
24-
2520 steps :
2621 - name : Checkout
2722 uses : actions/checkout@v4
2823 with :
2924 fetch-depth : 0
30- # submodules: true
31- # If using the 'assets' git submodule from Chirpy Starter, uncomment above
32- # (See: https://github.com/cotes2020/chirpy-starter/tree/main/assets)
3325
34- - name : Setup Pages
35- id : pages
36- uses : actions/configure-pages@v3
26+ - name : Setup Pages
27+ uses : actions/configure-pages@v5
3728
3829 - name : Setup Ruby
3930 uses : ruby/setup-ruby@v1
4031 with :
4132 ruby-version : 3.2
4233 bundler-cache : true
4334
44- - name : Build site
45- run : bundle exec jekyll b -d "_site/docs"
35+ - name : Build with Jekyll
36+ working-directory : ./docs
37+ run : |
38+ bundle install
39+ bundle exec jekyll build
4640 env :
4741 JEKYLL_ENV : " production"
4842
4943 - name : Test site
44+ working-directory : ./docs
5045 run : |
5146 bundle exec htmlproofer _site --disable-external --check-html --allow_hash_href
5247
53- - name : Upload site artifact
54- uses : actions/upload-pages-artifact@v1
55- with :
56- path : " _site/docs"
57-
58- deploy :
59- environment :
60- name : github-pages
61- url : ${{ steps.deployment.outputs.page_url }}
62- runs-on : ubuntu-latest
63- needs : build
64-
65- steps :
66- - name : Deploy to GitHub Pages
67- id : deployment
68- uses : actions/deploy-pages@v2
69- ndencies preinstalled
70-
71- on :
72- # Runs on pushes targeting the default branch
73- push :
74- branches : ["main"]
75-
76- # Allows you to run this workflow manually from the Actions tab
77- workflow_dispatch :
78-
79- # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
80- permissions :
81- contents : read
82- pages : write
83- id-token : write
84-
85- # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
86- # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
87- concurrency :
88- group : " pages"
89- cancel-in-progress : false
90-
91- jobs :
92- # Build job
93- build :
94- runs-on : ubuntu-latest
95- steps :
96- - name : Checkout
97- uses : actions/checkout@v4
98- - name : Setup Pages
99- uses : actions/configure-pages@v5
100- - name : Build with Jekyll
101- uses : actions/jekyll-build-pages@v1
102- with :
103- source : ./
104- destination : ./_site
10548 - name : Upload artifact
10649 uses : actions/upload-pages-artifact@v3
50+ with :
51+ path : ./docs/_site
10752
108- # Deployment job
10953 deploy :
11054 environment :
11155 name : github-pages
0 commit comments