-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (37 loc) · 1.1 KB
/
deploy-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
name: Deploy Documentation
on:
push:
branches:
- development
paths:
- 'pkg/**'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Foundry toolchain
run: |
wget https://github.com/foundry-rs/foundry/releases/download/nightly/foundry_nightly_linux_amd64.tar.gz
tar -xzf foundry_nightly_linux_amd64.tar.gz
sudo mv forge /usr/local/bin
- name: Generate documentation
run: |
cd pkg
forge doc -b
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_TOKEN }}
# update
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
# update
projectName: ${{ secrets.CLOUDFLARE_DOCS_PROJECT_NAME }}
directory: .
# to enable Github Deployments
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
branch: main
workingDirectory: pkg/docs-out/book