webpage #503
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
--- | |
# Updates web page on pushes to `master` as well as daily | |
name: webpage | |
on: | |
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 21:00 UTC | |
- cron: 0 21 * * * | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
# https://docs.github.com/en/actions/using-jobs/using-concurrency | |
concurrency: | |
# only cancel in-progress jobs or runs for the current workflow - matches against branch & tags | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
webpage: | |
if: github.repository == 'aiidateam/aiida-resource-registry' && github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
env: | |
COMMIT_AUTHOR: Deploy Action | |
COMMIT_AUTHOR_EMAIL: [email protected] | |
steps: | |
- uses: actions/checkout@v3 | |
- run: git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/* | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r ./gh_page/requirements.txt | |
- name: Collect all setup info of computers/codes into a single JSON file | |
run: python gh_page/generate_json.py | |
- name: Deploy 🚀 | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: gh_page/out # The folder the action should deploy. |