diff --git a/.forgejo/workflows/test.yaml b/.forgejo/workflows/test.yaml index 5d467e4..fc0173e 100644 --- a/.forgejo/workflows/test.yaml +++ b/.forgejo/workflows/test.yaml @@ -10,6 +10,7 @@ on: jobs: test: runs-on: nixos-do-s + enable-openid-connect: true steps: - name: Check out uses: https://code.forgejo.org/actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -45,6 +46,12 @@ jobs: - name: Build the package run: nix build --print-build-logs + - name: Push to the cache + if: ${{ !cancelled() && forge.ref == 'refs/heads/main' }} + uses: https://git.jcollie.dev/jeff/niks3-push@3f85f501658e379783381291241c6f8315a92716 + with: + server-url: https://niks3.jcollie.dev + # Published only from main, so that a branch build cannot replace the site # with a work in progress, and only after `test` has passed, so that it # cannot document a tree that does not compile. @@ -52,6 +59,7 @@ jobs: needs: test if: ${{ forge.ref == 'refs/heads/main' }} runs-on: nixos-do-s + enable-openid-connect: true steps: - name: Check out uses: https://code.forgejo.org/actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -70,3 +78,9 @@ jobs: --server jcollie.page --token ${{ forge.token }} --upload-dir zig-out/docs + + - name: Push to the cache + if: ${{ !cancelled() && forge.ref == 'refs/heads/main' }} + uses: https://git.jcollie.dev/jeff/niks3-push@3f85f501658e379783381291241c6f8315a92716 + with: + server-url: https://niks3.jcollie.dev