rebuild every time #26
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: ReBuild | |
on: | |
push: | |
workflow_dispatch: | |
env: | |
SB_pathPrefix: "/${{ github.event.repository.name }}/" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# Warning: For some reason, unable to get 'runtime config to work' so simply rebuild each time | |
# - name: Cache NPM Build | |
# id: cache | |
# uses: actions/cache@v4 | |
# with: | |
# path: dist | |
# key: stacbrowser2 | |
- name: NPM Install | |
# if: steps.cache.outputs.cache-hit != 'true' | |
run: npm install | |
- name: NPM Build | |
# if: steps.cache.outputs.cache-hit != 'true' | |
run: npm run build -- --historyMode=hash | |
# - name: Show Config.js Runtime | |
# continue-on-error: true | |
# run: | | |
# diff config.js dist/config.js | |
# - name: Overwrite Config.js | |
# run: | | |
# cp config.js dist/config.js | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
# Upload just 'dist/' folder | |
path: 'dist' | |
# https://github.com/actions/deploy-pages | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |