-
-
Notifications
You must be signed in to change notification settings - Fork 6
51 lines (51 loc) · 1.24 KB
/
buildv2.yaml
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: "[v2] Generate Database and Deploy to Pages"
on:
workflow_dispatch:
schedule:
- cron: "0 7 * * *"
push:
branches:
- v2
paths:
- "main.py"
- "requirements.txt"
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
Build:
name: Build Database
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
ref: v2
- name: Load secrets to environment variables
uses: oNaiPs/secrets-to-env-action@v1
with:
secrets: ${{ toJSON(secrets) }}
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
- name: Install Dependencies
run: pip install -r requirements.txt
- name: Update JSON File with main.py and then commit
shell: pwsh
run: |
try {
python3 main.py
git config --local user.email "[email protected]"
git config --local user.name "Natsu Tadama"
git add .
git commit -m "Update JSON"
git push
}
catch {
write-host "No changes made"
}