1
- name : Build and deploy Jekyll site to GitHub Pages
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
2
8
3
9
on :
10
+ # Runs on pushes targeting the default branch
4
11
push :
5
- branches :
6
- - main
12
+ branches : ["main"]
13
+
14
+ # Allows you to run this workflow manually from the Actions tab
15
+ workflow_dispatch :
16
+
17
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
18
+ permissions :
19
+ contents : read
20
+ pages : write
21
+ id-token : write
22
+
23
+ # Allow one concurrent deployment
24
+ concurrency :
25
+ group : " pages"
26
+ cancel-in-progress : true
7
27
8
28
jobs :
9
- github-pages :
29
+ # Build job
30
+ build :
10
31
runs-on : ubuntu-latest
11
32
steps :
12
- - uses : actions/checkout@v2
13
- - uses : helaili/jekyll-action@v2
33
+ - name : Checkout
34
+ uses : actions/checkout@v3
35
+ - uses : ruby/setup-ruby@v1
14
36
with :
15
- token : ${{ secrets.GITHUB_TOKEN }}
16
- target_branch : ' gh-pages'
17
- jekyll_env : production
37
+ bundler : " Gemfile.lock"
38
+ bundler-cache : true
39
+ - name : Setup Pages
40
+ id : pages
41
+ uses : actions/configure-pages@v2
42
+ - name : Build with Jekyll
43
+ # Outputs to the './_site' directory by default
44
+ run : bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
45
+ env :
46
+ JEKYLL_ENV : production
47
+ - name : Upload artifact
48
+ # Automatically uploads an artifact from the './_site' directory by default
49
+ uses : actions/upload-pages-artifact@v1
50
+
51
+ # Deployment job
52
+ deploy :
53
+ environment :
54
+ name : github-pages
55
+ url : ${{ steps.deployment.outputs.page_url }}
56
+ runs-on : ubuntu-latest
57
+ needs : build
58
+ steps :
59
+ - name : Deploy to GitHub Pages
60
+ id : deployment
61
+ uses : actions/deploy-pages@v1
0 commit comments