-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (36 loc) · 1.21 KB
/
pages-deployment.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
name: Erigon Docs Deployment
on:
push:
branches:
- development
- main
- testmichele
env:
MDBOOK_VERSION: v0.4.40
jobs:
deploy-cloudflare:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
environment: ${{ github.ref == 'refs/heads/main' && 'production' || 'preview' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install latest mdbook
run: |
url="https://github.com/rust-lang/mdbook/releases/download/$MDBOOK_VERSION/mdbook-$MDBOOK_VERSION-x86_64-unknown-linux-gnu.tar.gz"
mkdir mdbook
curl -sSL $url | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
- name: Build Book
run: |
# This assumes your book is in the root of your repository.
# Just add a `cd` here if you need to change to another directory.
mdbook build
- name: Publish
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy book --project-name=${{ secrets.CLOUDFLARE_PROJECT }} --commit-dirty=true