-
Notifications
You must be signed in to change notification settings - Fork 8
64 lines (51 loc) · 1.37 KB
/
ci.yml
File metadata and controls
64 lines (51 loc) · 1.37 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
name: Test & Build
on:
pull_request:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "latest"
python-version: 3.11
enable-cache: true
- name: Run check mod structure
run: uv run main.py scripts/check_mods_json.py
- name: Run tests
run: uv run pytest tests/ -v
build:
needs: test
if: >-
success() &&
github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "latest"
python-version: 3.11
enable-cache: true
- name: Generate HTML
run: uv run main.py scripts/update_index.py
- name: Deploy to gh-pages
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git checkout --orphan gh-pages
cp -r docs/* .
git add -f docs/index.html
git add -f docs/**/index.html
git commit -m "Update site from branch main changes [ci skip]" || echo "No changes to commit"
git push --force origin gh-pages