Aggregate sources and rebuild #127
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Aggregate sources and rebuild | |
on: | |
workflow_dispatch: | |
schedule: | |
# 19:42 UTC every Sunday | |
- cron: "42 19 * * 0" | |
# push: | |
# branches: | |
# - gh-pages | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.12"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: gh-pages | |
fetch-depth: 1 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Python dependencies | |
run: | | |
python -m pip install -r scripts/requirements.txt | |
- name: Aggregate and build | |
run: | | |
python scripts/build.py auto aggregate && | |
python scripts/build.py auto | |
- name: Commit files | |
run: | | |
git config user.name 'GitHub Action' && | |
git config user.email '[email protected]' && | |
git add -u . && | |
git commit -m "cd: auto build at $(TZ=UTC date +'%F'T'%T'Z)" && | |
git push --force-with-lease |