Skip to content

Merge pull request #3 from ironprogrammer/update-and-validate-data #17

Merge pull request #3 from ironprogrammer/update-and-validate-data

Merge pull request #3 from ironprogrammer/update-and-validate-data #17

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- main
paths:
- 'index.html'
- 'swim_time_standards.json'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Verify required files exist
run: |
for f in index.html swim_time_standards.json; do
if [ ! -f "$f" ]; then
echo "::error ::Required file '$f' not found. Aborting deployment."
exit 1
fi
done
- name: Prepare publish directory
run: |
rm -rf .publish
mkdir -p .publish
cp index.html .publish/
cp swim_time_standards.json .publish/
# show what will be published (helpful in logs)
ls -la .publish
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: .publish
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4