-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.31 KB
/
deploy-docs.yml
File metadata and controls
52 lines (44 loc) · 1.31 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
44
45
46
47
48
49
50
51
52
name: Deploy Docs to Cloudflare
on:
push:
branches: ["main"]
paths:
- "src/**"
- "pyproject.toml"
workflow_dispatch: # Allows manual trigger button
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: "pip"
- name: Install Dependencies
# Installs your project dependencies from the root pyproject.toml
run: |
python -m pip install --upgrade pip
pip install ".[dev]"
- name: Build MkDocs
# 1. Build the site using the config in the subfolder
# 2. Output to a temporary 'site' folder
run: mkdocs build -f src/mkdocs.yml -d site
- name: Prepare Subdirectory Structure
run: |
mkdir -p dist/
mv src/site/* dist/
- name: Deploy to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: codestory-docs
directory: dist
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
branch: main