erratic-gate/.github/workflows/build.yaml

42 lines
844 B
YAML
Raw Normal View History

2023-10-29 05:57:20 +01:00
name: Build and deploy
2023-10-29 05:46:53 +01:00
on:
push:
pull_request:
2023-10-29 05:57:20 +01:00
permissions:
contents: read
pages: write
id-token: write
2023-10-29 05:46:53 +01:00
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build project
2024-10-12 16:26:56 +02:00
run: nix build .#erratic-gate
2023-10-29 05:46:53 +01:00
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./result/www
2023-10-29 05:57:20 +01:00
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
2023-10-29 05:57:20 +01:00
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2