-
Notifications
You must be signed in to change notification settings - Fork 17
71 lines (57 loc) · 1.66 KB
/
docs.yaml
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
name: Build Docs site
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Checkout submodules
run: |
git submodule update --init --recursive
cd ./docs/content/candle-cloud
git checkout main
git pull origin main
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
- name: install protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Rust toolchain cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-rust-nightly-docs
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: rustc, cargo, rust-docs
- uses: extractions/setup-just@v1
- name: Build rustdocs
run: just rustdoc
- name: Build site
working-directory: ./docs
run: hugo --minify
- name: Generate build ID
id: prep
run: |
branch=${GITHUB_REF##*/}
sha=${GITHUB_SHA::8}
ts=$(date +%s)
echo "::set-output name=BUILD_ID::${branch}-${sha}-${ts}"
- name: Publish Wick Package
uses: candlecorp/[email protected]
id: push
with:
path: 'docs/docs.wick'
username: ${{ secrets.CANDLE_REG_USERNAME }}
password: ${{ secrets.CANDLE_REG_PASSWORD }}
tags: latest ${{ steps.prep.outputs.BUILD_ID }}