Merge pull request #850 from hwakabh/dependabot/npm_and_yarn/web-fron… #257
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: Frontend CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| # All updates except web-frontend/** will be ignored | |
| paths: | |
| - 'web-frontend/**' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: Build Vue app and Deploy | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| # https://github.com/actions/setup-node | |
| - name: Setup node.js environment | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| - name: Install packages with CI pipeline | |
| run: npm ci | |
| working-directory: ./web-frontend | |
| - name: Build vue-app to /docs | |
| run: | | |
| npx vite build | |
| cp -rp ./dist/index.html ./dist/404.html | |
| working-directory: ./web-frontend | |
| env: | |
| VITE_API_ENDPOINT: ${{ secrets.VITE_API_ENDPOINT }} | |
| - name: Upload as artifacts for GitHub Pages | |
| uses: actions/upload-pages-artifact@v4.0.0 | |
| with: | |
| path: ./web-frontend/dist | |
| retention-days: 3 | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| pages: write | |
| id-token: write | |
| actions: read | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy GitHub Pages from artifacts | |
| id: deployment | |
| uses: actions/deploy-pages@v4.0.5 |