Skip to content

Pages

Pages #54

name: Pages
# This configuration file is based on
# https://github.com/actions/starter-workflows/blob/2bb20df369386c3e20630fce032d3ab4915373a1/pages/jekyll-gh-pages.yml
# Run when the `README.md` rebuild workflow has run and succeeded (see the `if`
# in the `build` job). Borrowed from this example:
# https://github.com/GuillaumeFalourd/poc-github-actions/blob/1e2766ef6f6755edd79562d962c9e2521187419e/.github/workflows/12-run-workflow.yml
'on':
workflow_run:
workflows: [Rebuild]
types: [completed]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages.
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: 'pages'
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4