debugging ci is so fun #49
This file contains 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 to GitHub Pages | |
permissions: | |
id-token: write | |
pages: write | |
on: | |
push: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "20" | |
cache: "npm" | |
- run: npm ci | |
- run: npm run lint | |
- run: npm run build | |
- name: Upload build output | |
uses: actions/upload-artifact@v4 | |
with: | |
name: github-pages | |
path: ./dist # Adjust this path to match your build output directory | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Download build artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: github-pages | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |