forked from second-state/SewUp
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (30 loc) · 988 Bytes
/
doc.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
name: Doc
concurrency:
group: doc-${{ github.head_ref }}
cancel-in-progress: true
on:
push:
branches: [ main, doc ]
jobs:
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: cachix/install-nix-action@v15
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Build Native Documentation
run: nix develop -c 'cargo' doc -p sewup -p sewup-derive --all-features
- name: Build Wasm Documentation
run: nix develop -c 'cargo' doc -p sewup -p sewup-derive --all-features --target=wasm32-unknown-unknown
- name: Deploy Documentation
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./target/doc
SCRIPT_MODE: true
run: |
wget https://raw.githubusercontent.com/peaceiris/actions-gh-pages/v2.5.0/entrypoint.sh
bash ./entrypoint.sh