-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (36 loc) · 1.11 KB
/
build-website.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Build the website
on:
# Runs on pushes targeting the default branch
push:
branches:
- '*'
- '!main'
pull_request:
branches:
- '*'
- '!main'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# when there are subsequent pushes on the same branch, cancel existing jobs and run the new job instead.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# Single deploy job since we're just building
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Install Nix
uses: cachix/install-nix-action@v17
- name: Build website
run: nix build
- name: Download IPFS
run: ./.github/github_install_ipfs.sh
- name: Print IPFS hahs
run: PATH="/tmp/kubo:$PATH" ./result/www/ipfs-add.sh --pin=false; cat result/ipfs.url
- name: Compare IPFS hashes
run: PATH="/tmp/kubo:$PATH" test "ipfs://$(./result/www/ipfs-add.sh --pin=false)" = "$(cat result/ipfs.url)"