-
Notifications
You must be signed in to change notification settings - Fork 11
55 lines (46 loc) · 1.55 KB
/
publish-docs.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: publish
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
docs:
if: github.event_name == 'push' && github.event.ref == 'refs/heads/main'
name: docs
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set-Up
run: sudo apt install -y cmake pkg-config libssl-dev git build-essential clang libclang-dev curl protobuf-compiler
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Update apt repositories
run: sudo apt update
- name: Setup DVC
uses: iterative/setup-dvc@v1
- name: Fetch Fixtures
run: ./scripts/fetch-fixtures.sh
- name: Cache Cargo
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
target
target/debug
target/release
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build documentation
run: cargo doc --release --no-deps
- name: Publish documentation
run: |
cd target/doc
git init
echo '<meta http-equiv="refresh" content="0; url=https://webb-tools.github.io/protocol-substrate/pallet_vanchor/index.html">' > index.html
git add .
git -c user.name='ci' -c user.email='ci' commit -m 'Deploy documentation 🚀'
git push -f -q https://git:${{ secrets.github_token }}@github.com/${{ github.repository }} HEAD:gh-pages