Skip to content

Deploy page

Deploy page #285

Workflow file for this run

name: Deploy page
on:
workflow_dispatch:
schedule:
- cron: 37 9 * * *
push:
branches:
- main
paths-ignore:
- .github/**
- README.md
- LICENSE
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
build:
name: Build page
runs-on: ubuntu-22.04
permissions:
contents: read
steps:
- name: Check out repo
uses: actions/checkout@v3.5.2
with:
fetch-depth: 0
- name: Setup Ruby
# yamllint disable-line rule:line-length
uses: ruby/setup-ruby@7d546f4868fb108ed378764d873683f920672ae2 # v1.149.0
with:
bundler-cache: true
rubygems: 3.4.13
- name: Make sure Ruby versions match
run: |
asdf=$(grep --word 'ruby' .tool-versions)
bundle=$(bundle platform --ruby)
if [[ $asdf != "$bundle" ]]; then
printf '%s\n' \
"Ruby version mismatch:" \
".tool-versions: $asdf" \
"Gemfile: $bundle" >&2
exit 1
fi
- name: Build with Jekyll
env:
JEKYLL_ENV: production
run: bundle exec jekyll build --verbose --baseurl ''
- name: Upload artifact
uses: actions/upload-pages-artifact@v1.0.8
deploy:
name: Deploy page
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-22.04
needs: build
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2.0.1