-
Notifications
You must be signed in to change notification settings - Fork 29
67 lines (54 loc) · 1.56 KB
/
github-page.yml
File metadata and controls
67 lines (54 loc) · 1.56 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: "Update github pages"
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
with:
extra_nix_config: |
accept-flake-config = true
- uses: rrbutani/use-nix-shell-action@v1
with:
devShell: .#ghc914
- name: Update cabal indices
run: |
cabal update
- name: Build whole project
run: |
cabal build all
- name: Build haddock documentation
run: |
mkdir website
cabal haddock-project --output=./website --internal --foreign-libraries
- name: Build typedoc documentation
run: |
nix build .#wasm-typedoc
mkdir -p website/cardano-wasm/typedoc
cp -r result/. website/cardano-wasm/typedoc/
- name: Compress website
run: |
tar -czf website.tgz -C website .
- name: Upload website artifact
uses: actions/upload-artifact@v4
if: ${{ always() }}
continue-on-error: true
with:
name: website
path: ./website.tgz
- name: Deploy documentation to gh-pages 🚀
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN || github.token }}
publish_dir: website
cname: cardano-api.cardano.intersectmbo.org
force_orphan: true