Release Sort: Track the change of the plugins version. #56
Workflow file for this run
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: Deploy PR previews | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- closed | |
concurrency: preview-${{ github.ref }} | |
jobs: | |
deploy-preview: | |
runs-on: ubuntu-20.04 | |
env: | |
COMMIT_AUTHOR: Deploy Action | |
COMMIT_AUTHOR_EMAIL: action@github.com | |
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: 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 JSON file to the React project | |
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 | |
export VITE_PR_PREVIEW_PATH="/aiida-registry/pr-preview/pr-${{ github.event.number }}/" | |
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 preview | |
uses: rossjrw/pr-preview-action@v1 | |
with: | |
source-dir: ./aiida-registry-app/dist | |
preview-branch: gh-pages | |
umbrella-dir: pr-preview | |
action: auto | |
custom-url: |