1
- name : 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
2
8
3
9
on :
10
+ # Runs on pushes targeting the default branch
4
11
push :
5
- branches :
6
- - master
12
+ branches : ["master"]
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 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.
25
+ concurrency :
26
+ group : " pages"
27
+ cancel-in-progress : false
7
28
8
29
jobs :
9
- deploy :
30
+ # Build job
31
+ build :
10
32
runs-on : ubuntu-latest
11
- name : Deploy
12
33
steps :
13
- - uses : actions/checkout@v2
14
-
34
+ - name : Checkout
35
+ uses : actions/checkout@v4
36
+ with :
37
+ fetch-depth : 0
38
+ - name : Setup Ruby
39
+ uses : ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0
40
+ with :
41
+ ruby-version : ' 3.1' # Not needed with a .ruby-version file
42
+ bundler-cache : true # runs 'bundle install' and caches installed gems automatically
43
+ cache-version : 0 # Increment this number if you need to re-download cached gems
15
44
env :
16
45
BUNDLE_GITHUB__COM : x-access-token:${{ secrets.GH_REPO_PAT }}
17
- with :
18
- token : ${{ secrets.GH_REPO_PAT }}
19
- target_branch : gh-pages
46
+ - name : Setup Pages
47
+ id : pages
48
+ uses : actions/configure-pages@v5
49
+ - name : Build with Jekyll
50
+ # Outputs to the './_site' directory by default
51
+ run : bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
52
+ env :
53
+ JEKYLL_ENV : production
54
+ - name : Upload artifact
55
+ # Automatically uploads an artifact from the './_site' directory by default
56
+ uses : actions/upload-pages-artifact@v3
57
+
58
+ # Deployment job
59
+ deploy :
60
+ environment :
61
+ name : github-pages
62
+ url : ${{ steps.deployment.outputs.page_url }}
63
+ runs-on : ubuntu-latest
64
+ needs : build
65
+ steps :
66
+ - name : Deploy to GitHub Pages
67
+ id : deployment
68
+ uses : actions/deploy-pages@v4
0 commit comments