add: download schedule button + fix: bioprofile style #92
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: Format and Accessibility Check | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- name: Install dependencies | |
run: npm install | |
- name: Run Prettier | |
run: npm run format | |
- name: Check for unformatted code | |
run: | | |
if [[ `git status --porcelain` ]]; then | |
echo "Unformatted code found. Please run 'npm run format' and commit the changes." | |
git diff | |
exit 1 | |
else | |
echo "All code is properly formatted." | |
fi | |
accessibility: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- name: Install dependencies | |
run: npm install | |
- name: Install Pa11y | |
run: npm install -g pa11y | |
env: | |
CI: true | |
- name: Start server | |
run: npm start & | |
env: | |
CI: true | |
- name: Wait for server to be ready | |
run: npx wait-on http://localhost:4321 --timeout=30000 | |
- name: Run Pa11y on all routes | |
run: | | |
while read route; do | |
echo "Running Pa11y on $route" | |
npx pa11y $route | |
done < ./.github/workflows/routes.txt |