Skip to content

Rebuild Site

Rebuild Site #160

Workflow file for this run

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