Skip to content

Commit

Permalink
Fix CI (#20)
Browse files Browse the repository at this point in the history
* try to update everything and maybe fix ci

* flake bump maybe?

* fix maybe?

* fix againnnnn

* swap order

* morr

* ultimate fix attempt

* document workaround

* skip shallow

* fix comment

* re-add shallow
  • Loading branch information
kubukoz authored Mar 2, 2024
1 parent 7e1da89 commit 80830d8
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 14 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
name: "Build"
on:
pull_request:
branches: ['**']
branches: ["**"]
push:
branches: ['**']
tags: ['**']
branches: ["main"]
jobs:
ci:
name: CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
- uses: cachix/cachix-action@v12
- uses: cachix/install-nix-action@v25
- uses: cachix/cachix-action@v14
with:
name: kubukoz
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"

- name: Build (main)
if: github.ref == 'refs/heads/main'
Expand All @@ -30,7 +29,7 @@ jobs:

- name: Build (preview)
if: github.event_name == 'pull_request'
run: ./build.sh '.?submodules=1#preview' && cp -Lr ./result public-preview
run: ./build.sh 'preview' && cp -Lr ./result public-preview

- uses: JamesIves/github-pages-deploy-action@v4
name: Deploy (preview)
Expand Down
3 changes: 2 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

PACKAGE_PATH="$1"

nix build "${PACKAGE_PATH:-.?submodules=1}" --print-build-logs
# shallow + there must be a hash: workaround for https://github.com/NixOS/nix/pull/10125
nix build "git+file://$(pwd)/.?shallow=1&submodules=1#${PACKAGE_PATH:-default}" --print-build-logs
30 changes: 24 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 80830d8

Please sign in to comment.