-
Notifications
You must be signed in to change notification settings - Fork 7
70 lines (68 loc) · 2.16 KB
/
fetch_norn_data.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: FetchNornData
on:
workflow_dispatch:
schedule:
- cron: '0 11,22 * * *'
jobs:
build:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Check out repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- uses: actions/cache@v2
name: Configure pip caching
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Copy github ci files to ci-folder
run: |-
cp -r ./.github/fetch_norn_data ./ci-folder
- name: Checkout gh-pages branch
run: |-
git checkout gh-pages
- name: Install Python dependencies
run: |
python -m pip install -r ./ci-folder/requirements.txt
- name: Fetch norn-data
env:
MARKET_URL: ${{ secrets.MARKET_URL }}
MARKET_TOKEN: ${{ secrets.MARKET_TOKEN }}
AF_URL: ${{ secrets.AF_URL }}
AF_TOKEN: ${{ secrets.AF_TOKEN }}
run: |-
python ./ci-folder/fetch_norn_data.py
- name: Delete ci-folder
run: |-
rm -rf ./ci-folder
- name: Add norn-data and push it
run: |-
git config --global user.name "zmcx16-bot"
git config --global user.email "[email protected]"
git config --global pull.ff only
git pull
git reset --soft HEAD~1
git add ./norn-data/\* && git commit -m "updated website & norn-data"
git push -f
- name: Checkout zmcx16.github.io
uses: actions/checkout@master
with:
repository: zmcx16/zmcx16.github.io
token: ${{ secrets.ACTIONS_TOKEN }}
path: ./zmcx16.github.io
- name: Copy indusrty-table.json & push zmcx16.github.io
run: |-
cp -f ./norn-data/indusrty-table.json ./zmcx16.github.io/
cd ./zmcx16.github.io
git config --global user.name "zmcx16-bot"
git config --global user.email "[email protected]"
git add indusrty-table.json && git commit -m "updated indusrty-table.json"
git push