|
| 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 |
1 | 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: ["main"] |
| 12 | + branches: ["master"] |
| 13 | + |
| 14 | + # Allows you to run this workflow manually from the Actions tab |
6 | 15 | workflow_dispatch: |
7 | 16 |
|
| 17 | +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages |
8 | 18 | permissions: |
9 | 19 | contents: read |
10 | 20 | pages: write |
11 | 21 | id-token: write |
12 | 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. |
13 | 25 | concurrency: |
14 | | - group: "github-pages" |
| 26 | + group: "pages" |
15 | 27 | cancel-in-progress: false |
16 | 28 |
|
17 | 29 | jobs: |
| 30 | + # Build job |
18 | 31 | build: |
19 | 32 | runs-on: ubuntu-latest |
20 | 33 | steps: |
21 | 34 | - name: Checkout |
22 | | - uses: actions/checkout@v4 |
| 35 | + uses: actions/checkout@v5 |
23 | 36 | - name: Setup Ruby |
24 | | - uses: ruby/setup-ruby@v1 |
| 37 | + # https://github.com/ruby/setup-ruby/releases/tag/v1.207.0 |
| 38 | + uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4 |
25 | 39 | with: |
26 | | - ruby-version: '3.x' # Use a recent Ruby version |
27 | | - bundler-cache: true # runs bundle install and caches dependencies |
| 40 | + ruby-version: '3.1' # Not needed with a .ruby-version file |
| 41 | + bundler-cache: true # runs 'bundle install' and caches installed gems automatically |
| 42 | + cache-version: 0 # Increment this number if you need to re-download cached gems |
28 | 43 | - name: Setup Pages |
29 | 44 | id: pages |
30 | | - uses: actions/configure-pages@v4 |
| 45 | + uses: actions/configure-pages@v5 |
31 | 46 | - name: Build with Jekyll |
32 | | - run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_url }}" |
| 47 | + # Outputs to the './_site' directory by default |
| 48 | + run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" |
33 | 49 | env: |
34 | 50 | JEKYLL_ENV: production |
35 | 51 | - name: Upload artifact |
| 52 | + # Automatically uploads an artifact from the './_site' directory by default |
36 | 53 | uses: actions/upload-pages-artifact@v3 |
37 | | - with: |
38 | | - path: ./_site |
39 | 54 |
|
| 55 | + # Deployment job |
40 | 56 | deploy: |
41 | 57 | environment: |
42 | 58 | name: github-pages |
|
0 commit comments