Repository navigation
73 lines (60 loc) · 1.95 KB
/
Copy pathdocs.yml
File metadata and controls
73 lines (60 loc) · 1.95 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Deploy Documentation
on:
push:
branches: ["main"]
paths:
- "docs/**"
- "mkdocs.yml"
- "README.md"
- "apflow-logo.svg"
- ".github/workflows/docs.yml"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.12"
- name: Install docs dependencies
run: pip install -e ".[docs]"
- name: Prepare docs for MkDocs
run: |
# Copy README as index page
cp README.md docs/index.md
{
printf '%s\n' '---'
printf '%s\n' 'description: apflow documentation home for AI-perceivable distributed orchestration, quick start, architecture, and feature guides.'
printf '%s\n\n' '---'
cat docs/index.md
} > docs/index.md.tmp
mv docs/index.md.tmp docs/index.md
# Copy logo into docs assets
mkdir -p docs/assets
cp apflow-logo.svg docs/assets/
# Fix links in index.md: docs/X → X (since we're now inside docs/)
sed -i 's|\./docs/|./|g' docs/index.md
sed -i 's|(docs/|(|g' docs/index.md
# Fix logo reference in index.md
sed -i 's|\./apflow-logo\.svg|./assets/apflow-logo.svg|g' docs/index.md
- run: mkdocs build
- uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
with:
path: site
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5