forked from koaning/arxiv-frontpage
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 1.06 KB
/
rebuild.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
name: Rebuild Site
env:
WANDB_API_KEY: ${{ secrets.WANDB_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
on:
workflow_dispatch:
schedule:
- cron: '0 9 * * *'
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- name: Check out this repo
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: 3.9
cache: 'pip'
cache-dependency-path: |
requirements-build.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-build.txt
python -m pip install -e .
- name: Build new site
run: |
python -m frontpage build --preprocess
- name: Commit and push if it changed
run: |-
git config user.name "Automated"
git config user.email "[email protected]"
git add index.html
timestamp=$(date -u)
git commit -m "Latest data: ${timestamp}" || exit 0
git push