fix(utils/open-graph): skip generateOpenGraphImage
when in CI
#84
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: Accessibility Tests (pa11y) | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Building site and running accessibility tests | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 5 | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v2 | |
- name: Setup Node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18 | |
- name: Install Yarn | |
run: npm install -g yarn | |
- name: Install Dependencies | |
run: yarn install --frozen-lockfile | |
- name: Create .env file | |
run: | | |
touch .env | |
echo CONTENTFUL_ENDPOINT=${{ secrets.CONTENTFUL_ENDPOINT }} >> .env | |
echo CONTENTFUL_SCHEMA=${{ secrets.CONTENTFUL_SCHEMA }} >> .env | |
echo CONTENTFUL_TOKEN=${{ secrets.CONTENTFUL_TOKEN }} >> .env | |
- name: Build Next App | |
run: yarn build | |
- name: Boot Next App | |
run: yarn start & sleep 15 | |
- name: Run pa11y-ci | |
run: yarn lint:a11y 2>&1 | tee pa11y_output.txt | |
- name: Read pa11y_output | |
id: pa11y_output | |
uses: juliangruber/read-file-action@v1 | |
with: | |
path: ./pa11y_output.txt | |
- name: Check for Failures | |
if: contains(steps.pa11y_output.outputs.content, 'errno 2') | |
run: | | |
echo "::error::The site is failing accessibility tests." | |
exit 1 |