configuration.nix/.github/workflows/check.yml
Jalil David Salamé Messina 228c84cf93
Some checks failed
/ check (push) Successful in 30s
/ build (audiomenu) (push) Successful in 1s
/ build (docs) (push) Successful in 3s
/ build (jpassmenu) (push) Successful in 2s
/ build (nixosConfigurations.vm.config.system.build.toplevel) (push) Successful in 24s
/ build (nvim) (push) Successful in 15s
/ update-lockfile (push) Failing after 0s
[fix] ci: remove github's scheduled actions
I'll run them on my own CI instead
2024-07-20 16:06:25 +02:00

60 lines
1.7 KiB
YAML

name: Check flake
on:
push:
branches: [main]
path:
- ./**.nix
- ./flake.lock
pull_request:
# scheduled runs are run on my own infrastructure
# schedule:
# - cron: 5 4 * * 5 # At 04:05 on Friday.
jobs:
check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v12
- uses: DeterminateSystems/magic-nix-cache-action@v7
- name: Run `nix flake check`
run: |
nix flake check
nix run nixpkgs#statix -- check .
lockfile:
runs-on: ubuntu-22.04
needs: check
if: ${{ github.event_name == 'schedule' }} # only run when scheduled
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v12
- uses: DeterminateSystems/update-flake-lock@v23
- name: Run `nix flake check`
run: nix flake check
build-documentation:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'schedule' }} # only run when not scheduled
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v12
- uses: DeterminateSystems/magic-nix-cache-action@v7
- name: Build documentation
run: nix build .#docs --print-build-logs
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./result
deploy:
runs-on: ubuntu-latest
needs: build-documentation
if: ${{ github.event_name == 'push' }} # only run on main branch
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4