Fix path for online deployments #4
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 Offline Frontend | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- frontend/** | ||
- .github/workflows/build-offline-frontend.yml | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
concurrency: | ||
group: 'pages' | ||
cancel-in-progress: false | ||
jobs: | ||
build-offline-frontend: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout ${{ github.event.repository.name }} | ||
uses: actions/checkout@v3 | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20.x' | ||
- name: Build Frontend | ||
working-directory: frontend | ||
run: | | ||
sed -i '/base: /s/ \/\// /g' vite.config.js | ||
npm install | ||
npm run build -- --mode offline | ||
- name: Archive offline frontend | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: rpv-web-offline | ||
path: 'frontend/dist' | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: 'frontend/dist' | ||
deploy: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
needs: build-offline | ||
Check failure on line 61 in .github/workflows/build-offline-frontend.yml GitHub Actions / Build Offline FrontendInvalid workflow file
|
||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |