1name: Validate and publish
2on:
3 push:
4 workflow_dispatch:
5concurrency:
6 group: site
7 cancel-in-progress: true
8jobs:
9 site:
10 runs-on: ubuntu-latest
11 steps:
12 - uses: actions/checkout@v4
13 - name: Get the challenge repository (specifications and tools)
14 run: git clone --depth 1 --branch main https://vault1.magland.org/challenges/string challenge-repo
15 - uses: actions/setup-python@v5
16 with:
17 python-version: '3.12'
18 - run: pip install ./challenge-repo
19 - name: Validate submissions
20 run: challenge-tools validate --challenges challenge-repo/challenges --solutions solutions
21 - name: Build this repository's site
22 run: python web/build.py --out site
23 - if: github.ref == 'refs/heads/main'
24 uses: actions/configure-pages@v4
25 - if: github.ref == 'refs/heads/main'
26 uses: actions/upload-pages-artifact@v3
27 with:
28 path: site
29 - if: github.ref == 'refs/heads/main'
30 uses: actions/deploy-pages@v4