| 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 |
| 8 |
|
| 9 |
on: |
| 10 |
push: |
| 11 |
branches: |
| 12 |
- "master" |
| 13 |
paths: |
| 14 |
- "site/**" |
| 15 |
|
| 16 |
# Allows you to run this workflow manually from the Actions tab |
| 17 |
workflow_dispatch: |
| 18 |
|
| 19 |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages |
| 20 |
permissions: |
| 21 |
contents: read |
| 22 |
pages: write |
| 23 |
id-token: write |
| 24 |
|
| 25 |
# Allow one concurrent deployment |
| 26 |
concurrency: |
| 27 |
group: "pages" |
| 28 |
cancel-in-progress: true |
| 29 |
|
| 30 |
jobs: |
| 31 |
# Build job |
| 32 |
build: |
| 33 |
runs-on: ubuntu-latest |
| 34 |
defaults: |
| 35 |
run: |
| 36 |
working-directory: site |
| 37 |
steps: |
| 38 |
- name: Checkout |
| 39 |
uses: actions/checkout@v4 |
| 40 |
- name: Setup Ruby |
| 41 |
uses: ruby/setup-ruby@v1 |
| 42 |
with: |
| 43 |
ruby-version: '3.1' # Not needed with a .ruby-version file |
| 44 |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically |
| 45 |
cache-version: 0 # Increment this number if you need to re-download cached gems |
| 46 |
working-directory: '${{ github.workspace }}/site' |
| 47 |
- name: Setup Pages |
| 48 |
id: pages |
| 49 |
uses: actions/configure-pages@v5 |
| 50 |
- name: Build with Jekyll |
| 51 |
# Outputs to the './_site' directory by default |
| 52 |
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" |
| 53 |
env: |
| 54 |
JEKYLL_ENV: production |
| 55 |
- name: Upload artifact |
| 56 |
# Automatically uploads an artifact from the './_site' directory by default |
| 57 |
uses: actions/upload-pages-artifact@v3 |
| 58 |
with: |
| 59 |
path: "site/_site/" |
| 60 |
|
| 61 |
# Deployment job |
| 62 |
deploy: |
| 63 |
environment: |
| 64 |
name: github-pages |
| 65 |
url: ${{ steps.deployment.outputs.page_url }} |
| 66 |
runs-on: ubuntu-latest |
| 67 |
needs: build |
| 68 |
steps: |
| 69 |
- name: Deploy to GitHub Pages |
| 70 |
id: deployment |
| 71 |
uses: actions/deploy-pages@v4 |