-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (38 loc) · 1.12 KB
/
publish.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
name: Deploy to Cloudflare Pages
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'docs/**'
- 'README.md'
- 'book.toml'
jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
concurrency: build-web
steps:
- uses: actions/checkout@v3
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
# mdbook-version: '0.4.10'
mdbook-version: 'latest'
- name: Build website
run: make build
# - name: Publish pages
# run: make publish
# env:
# CLOUDFLARE_ACCOUNT_ID: ${{secrets.CLOUDFLARE_ACCOUNT_ID}}
# CLOUDFLARE_API_TOKEN: ${{secrets.CLOUDFLARE_API_TOKEN}}
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{secrets.CLOUDFLARE_ACCOUNT_ID}}
projectName: immersive-translate
directory: book
# Optional: Enable this if you want to have GitHub Deployments triggered
gitHubToken: ${{ secrets.GITHUB_TOKEN }}