ci: Build PRs and master branch #65
Workflow file for this run
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: "Publish site" | |
on: | |
# Run only when pushing to master branch | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
www: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@main | |
- name: Install omnix | |
run: nix --accept-flake-config profile install "github:juspay/omnix" | |
- run: om ci | |
- name: Static site 🔧 | |
if: github.ref == 'refs/heads/master' | |
run: | | |
nix build -j 4 .#site | |
- name: Deploy to gh-pages 🚀 | |
uses: peaceiris/actions-gh-pages@v3 | |
if: github.ref == 'refs/heads/master' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: result | |
# cname: nixpkgs.haskell.page |