Public MVP local GAPChain #5
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: Deploy Vue3 Vite to GitHub Pages | |
| on: | |
| push: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # Setup Node | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| cache-dependency-path: frontend-web/package-lock.json | |
| # Install dependencies | |
| - name: Install dependencies | |
| working-directory: frontend-web | |
| run: npm install | |
| # Build Vite app | |
| - name: Build | |
| working-directory: frontend-web | |
| run: npm run build | |
| # Setup GitHub Pages | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| # Upload dist folder instead of root | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: frontend-web/dist | |
| # Deploy | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v5 |