docs: add nix guide #44
This file contains 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: Nix Flake actions | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
nix-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v24 | |
- id: set-matrix | |
name: Generate Nix Matrix | |
run: | | |
set -Eeu | |
- id: build | |
name: nix build | |
run: nix build | |
- run: ls result/www | |
- run: ls -la ./ | |
- run: git fetch origin gh-pages | |
- run: git checkout gh-pages | |
- run: rm -fr docs | |
- run: cp -r --no-preserve=mode ./result/www docs | |
- run: echo "wiki.c4er.com" > ./docs/CNAME | |
- run: git add docs | |
- run: git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY | |
- run: git config --global user.email "[email protected]" | |
- run: git config --global user.name "Matt Carrier" | |
- run: git commit -m "update build" | |
- run: git push -f origin gh-pages | |
# 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 ".#" |