-
Notifications
You must be signed in to change notification settings - Fork 8
47 lines (38 loc) · 1.16 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
name: Deploy docs
on:
push:
branches:
- main
- dev
jobs:
deploy-docs:
if: github.repository == 'open-dollar/od-contracts'
name: Deploy docs
runs-on: ubuntu-latest
environment:
name: ${{ github.ref_name == 'main' && 'Prod' || 'Dev' }}
steps:
- uses: actions/checkout@v3
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
- name: Install node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Build Docs
run: ./build-docs.sh
- name: Create book folder
run: mdbook build docs
- uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required
vercel-org-id: ${{ secrets.ORG_ID}} #Required
scope: ${{ secrets.ORG_ID}} #Required
vercel-args: ${{ github.ref_name == 'main' && '--prod' || '' }}
vercel-project-id: ${{ secrets.PROJECT_ID}} #Required
working-directory: ./docs/book