ci(fix): URL with GitHub pages #5
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: π Deploy Next.js Website to GitHub Pages | |
| on: | |
| push: | |
| branches: ["website-production"] | |
| workflow_dispatch: | |
| env: | |
| NODE_ENV: ${{ vars.NODE_ENV }} | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| defaults: | |
| run: | |
| shell: bash | |
| working-directory: website | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: β¬οΈ Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: π’ Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: "./website/package.json" | |
| cache: npm | |
| cache-dependency-path: "./website/package-lock.json" | |
| - name: π¦ Install Dependencies (npm) | |
| run: | | |
| npm ci | |
| - name: π§ͺ Test The Site | |
| run: | | |
| npm test | |
| - name: π οΈ Build and Export Site | |
| run: | | |
| npm run build | |
| - name: π€ Upload Static Site | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: website/out | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: π Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |