Update aiida-zeopp
GitHub links (#262)
#1113
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 | |
jobs: | |
webpage: | |
if: github.repository == 'aiidateam/aiida-registry' | |
runs-on: ubuntu-latest | |
env: | |
COMMIT_AUTHOR: Deploy Action | |
COMMIT_AUTHOR_EMAIL: [email protected] | |
steps: | |
- uses: actions/checkout@v2 | |
- run: git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/* | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install prerequisites | |
run: pip install --upgrade wheel setuptools | |
- name: Install | |
run: pip install -e . -v | |
- name: Get cloned data from gh-pages | |
run: | | |
git remote set-url origin https://github.com/aiidateam/aiida-registry.git | |
git fetch origin gh-pages | |
git checkout origin/gh-pages plugins_metadata.json || true | |
mv plugins_metadata.json cloned_plugins_metadata.json || true | |
- name: fetch metadata | |
id: fetch_metadata | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: aiida-registry fetch | |
- name: Get entry points data | |
run: aiida-registry test-install | |
- name: Move the JSON file to the React directory | |
run: | | |
mv plugins_metadata.json aiida-registry-app/src/ | |
- 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_metadata.json 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 |