-
Notifications
You must be signed in to change notification settings - Fork 4
43 lines (36 loc) · 1.12 KB
/
Copy pathcppbind-docs.yml
File metadata and controls
43 lines (36 loc) · 1.12 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
41
42
43
name: CppBind documentation
on:
push:
branches:
- master
jobs:
cleanup-runs:
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@v0.3.3
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
generate-docs:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
needs: cleanup-runs
steps:
- uses: actions/checkout@v2.3.4
name: Checkout branch
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v2.2.2
with:
python-version: '3.7'
- name: Install python modules
run: |
python3 -m pip install --upgrade pip
if [ -f docs/requirements.txt ]; then pip install -r docs/requirements.txt; fi
- name: Generate files
run: mkdocs build
- name: Publish Cloudflare pages using wrangler
run: npx wrangler pages publish site/ --project-name cppbind
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}