Build website #4949
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: Build website | |
on: | |
push: | |
branches: [ main ] | |
schedule: | |
# Run every hour | |
- cron: '0 */4 * * *' | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ^1.13 | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
- name: Test | |
run: go test -v . | |
- name: Build website | |
run: go run main.go | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Run bibliography creator | |
run: | | |
python create-bibtex.py | |
mv bibliography.bibtex docs/bibliography.bibtex | |
- name: Commit changes | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Build website (automatic) | |
file_pattern: docs/index.html | |
- name: Commit changes | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Build website (automatic) | |
file_pattern: docs/bibliography.bibtex |