-
Notifications
You must be signed in to change notification settings - Fork 61
80 lines (66 loc) · 2.05 KB
/
gh-pages.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: github pages
on:
push:
branches:
- master
tags:
- v*
env:
RUST_VERSION: 1.80.1
FORC_VERSION: 0.63.3
CORE_VERSION: 0.34.0
jobs:
deploy-contributing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: "0.4.15"
- run: mdbook build ./docs/contributing-book
- name: Deploy master
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/contributing-book/book
destination_dir: contributing-book
if: github.ref == 'refs/heads/master'
deploy-forc-doc-sway-libs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
- name: Init cache
uses: Swatinem/rust-cache@v2
- name: Install Fuel toolchain
uses: FuelLabs/[email protected]
with:
name: my-toolchain
components: forc@${{ env.FORC_VERSION }}, fuel-core@${{ env.CORE_VERSION }}
- name: Build sway-libs docs
run: |
forc doc --manifest-path libs
- name: Deploy master std
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./libs/out/doc
destination_dir: master
if: github.ref == 'refs/heads/master'
- name: Get tag
id: branch_name
run: |
echo ::set-output name=BRANCH_NAME::${GITHUB_REF#refs/tags/}
if: startsWith(github.ref, 'refs/tags')
- name: Deploy std tag
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./libs/out/doc
destination_dir: ${{ steps.branch_name.outputs.BRANCH_NAME }}
if: startsWith(github.ref, 'refs/tags')