fix: Debian (macOS) compatibility (and GH workflows) #21
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: Website a11y | |
on: | |
pull_request: | |
branches: ["*"] | |
paths: | |
- docs/** | |
- .github/workflows/test-website-a11y.yml | |
workflow_dispatch: | |
permissions: | |
contents: read | |
# Prevent multiple concurrent runs | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: docs | |
env: | |
BUNDLE_GEMFILE: ${{github.workspace}}/docs/Gemfile | |
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.3 | |
- name: Install dependencies | |
run: | | |
bundle install | |
npm install -g pa11y-ci | |
- name: Use 'localhost' | |
uses: jacobtomlinson/gha-find-replace@v3 | |
with: | |
find: "https://python.stockindicators.dev" | |
replace: "http://127.0.0.1:4000" | |
regex: false | |
- name: Build site | |
run: bundle exec jekyll build | |
- name: Serve site | |
run: bundle exec jekyll serve --port 4000 --detach | |
- name: Show environment | |
run: npx pa11y --environment | |
- name: Test accessibility | |
run: > | |
pa11y-ci | |
--sitemap http://127.0.0.1:4000/sitemap.xml | |
--config ./.pa11yci | |
- name: Kill site (failsafe) | |
if: always() | |
run: pkill -f jekyll |