Skip to content

Commit 80e91f1

Browse files
committed
cicd: fix job environments
1 parent 46629fc commit 80e91f1

1 file changed

Lines changed: 23 additions & 10 deletions

File tree

.github/workflows/cd.yml

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,8 @@ jobs:
88
release:
99
timeout-minutes: 5
1010
runs-on: ubuntu-latest
11-
environment:
12-
name: github-pages
13-
url: ${{ steps.deployment.outputs.page_url }}
1411
permissions:
1512
contents: write
16-
pages: write
17-
id-token: write
1813
env:
1914
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2015
steps:
@@ -40,10 +35,29 @@ jobs:
4035
run: |
4136
TAG=${GITHUB_REF#refs/tags/}
4237
gh release create "$TAG" *.json --title "$TAG" --notes "Release $TAG"
43-
- run: |
44-
mkdir --verbose dist/
45-
mv --verbose exercises*.json dist/
46-
cp --verbose i18n.json dist/
38+
39+
pages:
40+
timeout-minutes: 5
41+
runs-on: ubuntu-latest
42+
environment:
43+
name: github-pages
44+
url: ${{ steps.deployment.outputs.page_url }}
45+
permissions:
46+
contents: read
47+
pages: write
48+
id-token: write
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
steps:
52+
- uses: actions/checkout@v6
53+
- uses: cachix/install-nix-action@v31
54+
with:
55+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
56+
extra_nix_config: |
57+
extra-substituters = https://cache.garnix.io
58+
extra-trusted-public-keys = cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=
59+
- uses: DeterminateSystems/magic-nix-cache-action@v13
60+
- run: nix develop -c just dist
4761
- uses: actions/upload-pages-artifact@v4
4862
with: { path: ./dist }
4963
- uses: actions/deploy-pages@v4
@@ -57,7 +71,6 @@ jobs:
5771
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5872
permissions:
5973
contents: write
60-
id-token: write
6174
steps:
6275
- run: | # Cleanup rolling releases > 7 days or < 12 hours
6376
gh release list --json tagName,createdAt,isPrerelease \

0 commit comments

Comments
 (0)