Skip to content

build: add github action #10

build: add github action

build: add github action #10

name: Nix Flake actions
on:
pull_request:
push:
branches:
- master
- main
jobs:
nix-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v24
- id: set-matrix
name: Generate Nix Matrix
run: |
set -Eeu
- run: nix build
- run: ls result/www
- run: ls -la ./
# - run: nix-shell -p ghp-import
# - run: ghp-import --message "Automatic update from https://github.com/icecreammatt/wiki.net" ./result/www
# - run: git push --force origin gh-pages:gh-pages
# matrix="$(nix eval --json '.#')"
# echo "matrix=$matrix" >> "$GITHUB_OUTPUT"
# nix-build:
# needs: nix-matrix
# runs-on: ${{ matrix.os }}
# strategy:
# matrix: ${{fromJSON(needs.nix-matrix.outputs.matrix)}}
# steps:
# - uses: actions/checkout@v4
# - uses: cachix/install-nix-action@v24
# - run: nix build -L ".#"