-
Notifications
You must be signed in to change notification settings - Fork 105
51 lines (42 loc) · 1.21 KB
/
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
name: Docs
on:
pull_request:
branches: [master]
push:
branches: [master]
env:
CARGO_TERM_COLOR: always
TERM: xterm-256color
jobs:
docs:
runs-on: ubuntu-latest
env:
RUSTUP_HOME: /tmp/rustup_home
if: github.actor != 'dependabot[bot]'
steps:
- uses: actions/checkout@v3
- name: "Install: Rust toolchain"
uses: dsherret/rust-toolchain-file@v1
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Build docs
run: make doc
- name: Copy logo image
run: cp ./images/logo.svg ./target/doc/
- name: Deploy
if: github.event_name == 'push'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc
cname: docs.gear.rs
force_orphan: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
- name: Deploy PR
if: github.event_name == 'pull_request'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc
destination_dir: pr-${{ github.event.number }}