feat: add site build #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Deploy binary cache" | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| - "master" | |
| paths: | |
| - "src/**" | |
| - "patches/**" | |
| - "queries/**" | |
| - "Cargo.*" | |
| - "flake.*" | |
| env: | |
| CACHE_NAME: "reciperium" | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install nix | |
| uses: cachix/install-nix-action@v31 | |
| with: | |
| github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Restore and save Nix store | |
| uses: nix-community/cache-nix-action@v7 | |
| with: | |
| primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }} | |
| - uses: cachix/cachix-action@v16 | |
| with: | |
| name: ${{ env.CACHE_NAME }} | |
| # If you chose API tokens for write access OR if you have a private cache | |
| authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" | |
| - name: Build default package | |
| run: | | |
| nix build --no-link --print-out-paths | cachix push ${{ env.CACHE_NAME }} |