Bump json from 2.8.2 to 2.9.0 #206
Workflow file for this run
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: Build and deploy site to GitHub Pages | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
# Build job | |
build: | |
if: always() | |
runs-on: ubuntu-latest | |
steps: | |
# Clone the code | |
- uses: actions/checkout@v4 | |
# Set up Ruby | |
- name: Set up Ruby 3 | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.2' | |
bundler-cache: true | |
# Generate static site | |
- name: Bundle Jekyll | |
run: | | |
bundle install --jobs 4 --retry 3 | |
bundle exec jekyll build | |
# Upload the gh-pages artifact | |
- name: Fix permissions | |
run: | | |
chmod -c -R +rX "_site/" | while read line; do | |
echo "::warning title=Invalid file permissions automatically fixed::$line" | |
done | |
- name: Upload Pages artifact | |
uses: actions/upload-pages-artifact@v3 | |
# Deploy job | |
deploy: | |
if: github.ref == 'refs/heads/master' | |
# 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 gh-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@v4 | |
# Update search index | |
search-index: | |
if: github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
# Add a dependency to the deployment job | |
needs: deploy | |
steps: | |
# Clone the code | |
- uses: actions/checkout@v4 | |
# Set up Ruby | |
- name: Set up Ruby 3 | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.2' | |
bundler-cache: true | |
# Generate static site | |
- name: Bundle Jekyll | |
run: | | |
bundle install --jobs 4 --retry 3 | |
bundle exec jekyll build | |
# Algolia search index | |
- name: Update Algolia index | |
if: github.ref == 'refs/heads/master' | |
run: | | |
bundle exec jekyll algolia | |
env: | |
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_KEY }} |