-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (34 loc) · 1.06 KB
/
docs.yml
File metadata and controls
40 lines (34 loc) · 1.06 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
name: Deploy Documentation
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@nightly
with:
targets: x86_64-unknown-none
- name: Install mdBook (Latest Binary)
run: |
mkdir bin
curl -sSL https://api.github.com/repos/rust-lang/mdBook/releases/latest \
| grep "browser_download_url.*x86_64-unknown-linux-gnu.tar.gz" \
| cut -d : -f 2,3 \
| tr -d \" \
| xargs curl -sSL \
| tar -xz -C bin
echo "$(pwd)/bin" >> $GITHUB_PATH
- name: Build Documentation
run: make doc
- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy book --project-name=prokadoc