Skip to content

feat: add CI workflow for building and deploying demo to ghpages #1

feat: add CI workflow for building and deploying demo to ghpages

feat: add CI workflow for building and deploying demo to ghpages #1

Workflow file for this run

name: CI
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: DeterminateSystems/determinate-nix-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Run Nix Build
run: |
nix build .#demo --print-build-logs
- uses: actions/upload-pages-artifact@main
if: github.ref == 'refs/heads/main'
with:
path: result
deploy:
name: Deploy
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@main