-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (51 loc) · 1.7 KB
/
python-app.yml
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: kcwiki-improvement-data-update
on:
push:
branches: [ main ]
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 0 * * 1,5'
workflow_dispatch:
jobs:
build:
name: Generate Json
runs-on: ubuntu-latest
# env:
# KCKIT_REPO_URL: https://github.com/TeamFleet/KCKit.git
# KCKIT_REPO_BRANCH: master
# WCTF_DB_REPO_URL: https://github.com/TeamFleet/WhoCallsTheFleet-DB.git
# WCTF_DB_REPO_BRANCH: master
steps:
- name: Run actions/[email protected]
uses: actions/[email protected]
- name: Set up Python 3 environment
uses: actions/[email protected]
with:
python-version: 3.10.13
- name: Run actions/[email protected]
uses: actions/[email protected]
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Before build
run: |
pip install -r requirements.txt
- name: Run build
run: |
python main.py
- name: Before deploy
run: |
mkdir output
cp improve_data.json output/improve_data.json
cp api_start2.json output/api_start2.json
# echo bot.kcwiki.moe > output/CNAME
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./output