-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (84 loc) · 2.63 KB
/
docs.yml
File metadata and controls
91 lines (84 loc) · 2.63 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
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Deploy Documentation
on:
push:
branches:
- main
paths:
- 'docs/**'
- 'mkdocs.yml'
- 'pyproject.toml'
- '.github/actions/setup-diffbio/action.yml'
- '.github/workflows/docs.yml'
workflow_dispatch:
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up DiffBio docs environment
uses: ./.github/actions/setup-diffbio
with:
python-version: '3.11'
cache-suffix: docs-py311
linux-editable-target: ".[docs]"
- name: Build documentation
run: uv run mkdocs build --clean --strict
- name: Prepare deployment directory
run: |
mkdir -p deploy/diffbio
mv site/* deploy/diffbio/
echo "docs.avitai.bio" > deploy/CNAME
cat > deploy/index.html << 'EOF'
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Avitai Documentation</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
max-width: 800px;
margin: 100px auto;
padding: 20px;
text-align: center;
}
h1 { color: #333; }
ul { list-style: none; padding: 0; }
li { margin: 10px 0; }
a {
color: #0066cc;
text-decoration: none;
font-size: 18px;
padding: 10px 20px;
display: inline-block;
border: 1px solid #0066cc;
border-radius: 5px;
transition: all 0.3s;
}
a:hover {
background: #0066cc;
color: white;
}
</style>
</head>
<body>
<h1>Avitai Documentation</h1>
<p>Available documentation:</p>
<ul>
<li><a href="./diffbio/">DiffBio - Differentiable Bioinformatics</a></li>
</ul>
</body>
</html>
EOF
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./deploy
force_orphan: true
cname: docs.avitai.bio