Skip to content

cachix

cachix #1094

Workflow file for this run

on:
push:
branches: [main]
pull_request:
permissions:
contents: write
pull-requests: write
jobs:
check-and-build:
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v30
- uses: cachix/cachix-action@v15
with:
name: mobusoperandi-website
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- run: nix --accept-flake-config flake check
- run: nix --accept-flake-config build
- uses: actions/upload-artifact@v4
with:
path: ./result
if-no-files-found: error
- uses: actions/upload-pages-artifact@v3
with:
path: ./result
deploy-preview:
if: github.event_name == 'pull_request'
needs: check-and-build
environment: pull_request_deployment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v30
- uses: cachix/cachix-action@v15
with:
name: mobusoperandi-website
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- uses: actions/download-artifact@v4
with:
name: artifact
path: .vercel/output/static
- id: deploy
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
run: nix --accept-flake-config run .#deploy-preview
- uses: thollander/actions-comment-pull-request@v2
with:
message: |
Branch deployed for review at:
${{ steps.deploy.outputs.URL }}
deploy-production:
if: github.ref == 'refs/heads/main'
needs: check-and-build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- id: deployment
uses: actions/deploy-pages@v4