-
Notifications
You must be signed in to change notification settings - Fork 4
51 lines (42 loc) · 1.48 KB
/
trigger-plot-manually.yaml
File metadata and controls
51 lines (42 loc) · 1.48 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
name: "Trigger plot manually"
on:
workflow_dispatch:
jobs:
plot:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: accumulate-data
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
version: "latest"
- name: Install dependencies
run: |
uv tool install invoke
inv env.init-dev --no-pre-commit
- name: Plot data
run: |
uv run python bahamut_ani_stat plot anime sqlite:///data/anime.db docs/assets/plots/anime.html
uv run python bahamut_ani_stat plot premium-rate sqlite:///data/anime.db docs/assets/plots/premium-rate.html
uv run python bahamut_ani_stat plot anime-trend sqlite:///data/anime.db docs/assets/plots/new-anime-trend.html
- name: Push data
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add docs
git commit -m "chore(plot): generate new plot"
git push origin accumulate-data
- name: Build docs
run: |
inv doc.build --no-local
- name: Push documentation to Github Page
uses: peaceiris/actions-gh-pages@v4.0.0
with:
personal_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
publish_branch: gh-pages
publish_dir: ./site