ci/cd: pr-preview tiny fix #2
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 to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
build-and-deploy: | |
concurrency: ci-${{ github.ref }} | |
runs-on: ubuntu-20.04 | |
if: github.repository == 'aiidateam/aiida-explorer' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- name: Set vite base path variable | |
run: echo "VITE_BASE_PATH=/aiida-explorer/" >> $GITHUB_ENV | |
- name: Install and build project | |
run: | | |
npm install | |
npm run build | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: ./dist | |
# for pr-preview: | |
clean-exclude: pr-preview/ | |
force: false |