webpage #1630
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: | |
- master | |
workflow_dispatch: | |
jobs: | |
webpage: | |
timeout-minutes: 90 | |
if: github.repository == 'aiidateam/aiida-registry' | |
runs-on: ubuntu-latest | |
env: | |
COMMIT_AUTHOR: Deploy Action | |
COMMIT_AUTHOR_EMAIL: [email protected] | |
steps: | |
- name: Checkout Repo ⚡️ | |
uses: actions/checkout@v3 | |
- name: Create dev environment | |
uses: ./.github/actions/create-dev-env | |
- name: Generate metadata | |
uses: ./.github/actions/generate-metadata | |
with: | |
gh_token: ${{ secrets.GITHUB_TOKEN }} | |
cache: false | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- name: Install npm dependencies and build | |
run: | | |
npm install | |
npm run build | |
working-directory: ./aiida-registry-app | |
- name: Add plugins file to the build folder | |
run: cp aiida-registry-app/src/plugins_metadata.json aiida-registry-app/dist/ | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./aiida-registry-app/dist | |
keep_files: true |