Bump vite from 6.3.4 to 7.1.11 in /lemonade-map #260
Workflow file for this run
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: CI/CD Pipeline | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: 'lemonade-map/package-lock.json' | |
| - name: Install dependencies | |
| run: | | |
| cd lemonade-map | |
| npm ci | |
| - name: Run tests | |
| run: | | |
| cd lemonade-map | |
| ./scripts/run-tests.sh | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| needs: test | |
| # Only run build job on main branch push or pull requests | |
| if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.draft == false) | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: 'lemonade-map/package-lock.json' | |
| - name: Install dependencies | |
| run: | | |
| cd lemonade-map | |
| npm ci | |
| - name: Build production bundle | |
| run: | | |
| cd lemonade-map | |
| npm run build | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-artifacts | |
| path: lemonade-map/dist | |
| retention-days: 7 | |
| deploy: | |
| name: Deploy to GitHub Pages | |
| runs-on: ubuntu-latest | |
| needs: build | |
| # Only deploy on push to main branch | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build-artifacts | |
| path: lemonade-map/dist | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Deploy to GitHub Pages | |
| uses: JamesIves/github-pages-deploy-action@v4.5.0 | |
| with: | |
| folder: lemonade-map/dist | |
| branch: gh-pages | |
| clean: true | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Ensure 404.html exists in dist directory | |
| run: | | |
| # Create or update 404.html in the dist directory | |
| cp lemonade-map/public/404.html lemonade-map/dist/404.html | |
| # Create .nojekyll file to disable Jekyll processing | |
| touch lemonade-map/dist/.nojekyll | |
| - name: Verify GitHub Pages Configuration | |
| run: | | |
| echo "GitHub Pages deployment completed. Please verify the site is working correctly." | |
| echo "If you encounter a blank page, please check the GitHub repository settings:" | |
| echo "1. Go to Settings > Pages" | |
| echo "2. Ensure the source is set to 'Deploy from a branch'" | |
| echo "3. Ensure the branch is set to 'gh-pages' and the folder is set to '/ (root)'" |