pipeline changes #2
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 | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| env: | |
| CI: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| permissions: | |
| contents: "read" | |
| id-token: "write" | |
| pages: "write" | |
| actions: "write" | |
| checks: "write" | |
| deployments: "write" | |
| strategy: | |
| matrix: | |
| node-version: [24] | |
| # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v5 | |
| with: | |
| version: 10 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install dependencies | |
| # Using npm ci is generally faster than running npm i because it caches dependencies | |
| run: | | |
| pnpm install | |
| - name: Test | |
| run: pnpm test | |
| - name: Build the app | |
| run: | | |
| pnpm run build | |
| - name: Stage deploy directory | |
| run: | | |
| mkdir -p deploy | |
| cp index.html deploy/ | |
| cp -r dist deploy/ | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: "deploy/" | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |