-
Notifications
You must be signed in to change notification settings - Fork 6
34 lines (33 loc) · 956 Bytes
/
doc.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
name: Documentation deployement
on:
pull_request_target:
types:
- closed
branches:
- main
release:
types: [published]
jobs:
build_publish_docs:
# Deploy to cloudflare
if: github.event_name == 'release' || github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Document
run: |
pip install -r requirements-dev.txt
sudo apt update
sudo apt install -y pandoc
touch .env
echo "SPHINX_GITHUB_CHANGELOG_TOKEN=${{secrets.DOC_GH_API_TOKEN}}" > .env
sphinx-build -b html docs build
- name: Publish
uses: cloudflare/pages-action@1
with:
apiToken: ${{ secrets.PRD_CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.PRD_CLOUDFLARE_ACCOUNT_ID }}
projectName: mpqp
branch: main
directory: build