Building and deploying GitHub pages #2628
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: Building and deploying GitHub pages | |
on: | |
# schedule runs _only_ for the default branch (for a repository) and the base branch (for a PR). | |
# See https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onschedule for more info. | |
schedule: | |
# See https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows#scheduled-events-schedule | |
# run every day at 05:20 UTC | |
- cron: "20 5 * * *" | |
# also update pages on pushes to master | |
push: | |
branches: | |
- master | |
jobs: | |
daily_build: | |
runs-on: ubuntu-latest | |
env: | |
COMMIT_AUTHOR: Daily Deploy Action | |
COMMIT_AUTHOR_EMAIL: action@github.com | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install OPTIMADE | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r make_ghpages/requirements.txt | |
- name: Make pages | |
run: cd make_ghpages && python make_pages.py | |
timeout-minutes: 120 | |
- name: Commit to gh-pages | |
run: ./make_ghpages/commit.sh | |
- name: Push changes | |
uses: ad-m/github-push-action@v0.8.0 | |
with: | |
branch: gh-pages | |
force: true | |
github_token: ${{ secrets.GITHUB_TOKEN }} |