1name: Results
2on:
3 push:
4 workflow_dispatch:
5concurrency:
6 group: results
7 cancel-in-progress: true
8jobs:
9 results:
10 runs-on: ubuntu-latest
11 steps:
12 - uses: actions/checkout@v4
13 - name: Check out the challenge repository
14 uses: actions/checkout@v4
15 with:
16 repository: challenges/string
17 path: challenge-repo
18 - uses: actions/setup-python@v5
19 with:
20 python-version: '3.12'
21 - run: pip install ./challenge-repo
22 - name: Validate submissions
23 run: challenge-tools validate --challenges challenge-repo/challenges --solutions solutions
24 - name: Build results site
25 run: >
26 challenge-tools build --challenges challenge-repo/challenges --solutions solutions --out site
27 --challenge-repo-url https://vault1.magland.org/challenges/string
28 --solutions-repo-url https://vault1.magland.org/challenges/string-solutions
29 - if: github.ref == 'refs/heads/main'
30 uses: actions/configure-pages@v4
31 - if: github.ref == 'refs/heads/main'
32 uses: actions/upload-pages-artifact@v3
33 with:
34 path: site
35 - if: github.ref == 'refs/heads/main'
36 uses: actions/deploy-pages@v4