Skip to content

Commit

Permalink
github: add build and publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcur committed May 5, 2024
1 parent 6eccbf3 commit e63bdae
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/build-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: build-site

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Build Sprokkel
run: nix build .#sprokkel

- name: Build site
run: ./result/bin/sprokkel build ./example/sprokkel.uint.one

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./out

deploy:
runs-on: ubuntu-latest
needs: build

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy site
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit e63bdae

Please sign in to comment.