forked from orogene/orogene
-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (49 loc) · 1.48 KB
/
web.yml
File metadata and controls
57 lines (49 loc) · 1.48 KB
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
name: Web
on:
pull_request:
push:
branches:
- main
schedule:
- cron: '11 7 * * 1,4'
jobs:
web:
name: Build and deploy site and docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Cache web cargo dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-web-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install mdbook
run: |
mkdir mdbook
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.14/mdbook-v0.4.14-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
- name: Run mdbook build
run: |
cd book
mdbook build
- name: Install oranda
run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/oranda/releases/download/v0.4.1/oranda-installer.sh | sh
- name: Run oranda
run: oranda build
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4.4.1
if: ${{ github.ref == 'refs/heads/main' }}
with:
branch: gh-pages
folder: public
token: ${{ secrets.GITHUB_TOKEN }}
single-commit: true