Merge pull request #325 from knrdl/dependabot/npm_and_yarn/client/vit… #337
This file contains hidden or 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: Github Page Publish | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
github-page: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
cache: 'npm' | |
cache-dependency-path: client/package-lock.json | |
- name: apply demo customizations | |
run: | | |
sed -i "s/username: string = ''/username: string = 'admin'/" client/src/auth/Login.svelte | |
sed -i "s/password: string = ''/password: string = '123456'/" client/src/auth/Login.svelte | |
sed -i "s|// MOCK_PLACEHOLDER|import { WebSocketMock as WebSocket } from './api.mock'|" client/src/api.ts | |
- run: cd client && npm install && npm run build | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./client/dist | |