ci: Use SUBDIR env var to specify subdir #11
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: Build and Deploy | |
on: | |
push: | |
branches: | |
- main | |
- master | |
pull_request: {} | |
permissions: | |
contents: write | |
env: | |
SUBDIR: /scholarly-browser/ | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
- name: Setup Node ✨ | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
cache: npm | |
- name: Install and Build 🔧 | |
run: | | |
npm i | |
cd node_modules/artifact-explorer && npm i && npm run build && cd ../.. # Install and build artifact-explorer dependency (not done automatically because installed from GitHub). | |
npm run build | |
- name: Deploy 🚀 | |
uses: JamesIves/github-pages-deploy-action@releases/v4 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: pages | |
FOLDER: dist | |
CLEAN: true |