Skip to content

Merge pull request #240 from wpaccessibility/235-fix-code-errors #82

Merge pull request #240 from wpaccessibility/235-fix-code-errors

Merge pull request #240 from wpaccessibility/235-fix-code-errors #82

Workflow file for this run

# This workflow builds and deploys a Jekyll site to the gh-pages branch
# This allows both main site and PR previews to coexist on the same branch
name: Deploy Jekyll site to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions to allow pushing to gh-pages branch
permissions:
contents: 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 and deploy job
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby
# https://github.com/ruby/setup-ruby/releases/tag/v1.207.0
uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4
with:
ruby-version: '3.3.6' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 0 # Increment this number if you need to re-download cached gems
- name: Build with Jekyll
# Build site without baseurl for main site deployment
run: bundle exec jekyll build
env:
JEKYLL_ENV: production
- name: Deploy to gh-pages branch
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_site
publish_branch: gh-pages
# Keep existing PR preview files in pr-preview directory
keep_files: true
# Only deploy to root, preserve pr-preview subdirectories
destination_dir: .