-
Notifications
You must be signed in to change notification settings - Fork 23
78 lines (66 loc) · 2.05 KB
/
Copy pathdocs.yml
File metadata and controls
78 lines (66 loc) · 2.05 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
74
75
76
77
78
name: Docs
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: docs
cancel-in-progress: true
env:
PYTHON_VERSION: "3.12"
UV_VERSION: "0.10.9"
UV_NO_MANAGED_PYTHON: "1"
NO_MKDOCS_2_WARNING: "1"
jobs:
build:
name: Build Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Install Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
version: ${{ env.UV_VERSION }}
enable-cache: true
- name: Install dependencies
run: uv sync --locked --dev --extra docs
- name: Build docs
run: uv run mkdocs build --strict
- name: Upload rendered docs
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: docs-site
path: site/
if-no-files-found: error
deploy:
name: Deploy Docs
runs-on: ubuntu-latest
needs: build
steps:
- name: Download rendered docs
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: docs-site
path: site/
- name: Deploy to website repo
uses: cpina/github-action-push-to-another-repository@55306faa4ed53b815ae49e564af8cfb359d32ae2 # v1.7.3
env:
SSH_DEPLOY_KEY: ${{ secrets.DOCS_DEPLOY_KEY }}
with:
source-directory: site/
destination-github-username: ml4t
destination-repository-name: website
target-directory: static/docs/data/
target-branch: main
commit-message: "docs(data): update from ml4t/data@${{ github.sha }}"
user-name: ml4t-bot
user-email: bot@ml4trading.io