update jekyll #41
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to GitHub Pages | |
# Run when new code is pushed to one of the main branches. Also provide a button for manual deploys. | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
# Cancel any runs in progress -- just complete the latest run | |
concurrency: | |
group: github_pages | |
cancel-in-progress: true | |
jobs: | |
build: | |
# Grab a Linux runner from the pool | |
runs-on: ubuntu-latest | |
# Publishing needs to write to the gh-pages branch | |
permissions: | |
contents: write | |
steps: | |
# Jekyll Picture Tag requires libvips libraries for resizing images, which must be installed | |
- name: Install JPT's dependencies | |
run: sudo apt-get install libvips-tools | |
# Put repository source onto the runner so we can build it | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# Install the proper version of Ruby and run bundle install | |
- name: 💎 Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
cache-version: 2 | |
ruby-version: "3.2.2" | |
- name: ✨ Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
# Build the site | |
- name: 🧪 Jekyll build | |
run: bundle exec jekyll build | |
env: | |
JEKYLL_ENV: production | |
- name: ⏫ Upload artifact to GitHub Pages | |
id: artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: _site/ | |
deploy: | |
# Add a dependency to the build job | |
needs: build | |
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
# Deploy to the github-pages environment | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
# Specify runner + deployment step | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 | |