fixes, cleanups of project page and featured projects in homepage (#17) #35
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: Build and Deploy | |
| on: | |
| push: | |
| branches: | |
| - main # Runs the build when pushing to your test branch | |
| # Set permissions for the GITHUB_TOKEN to allow uploading and deploying | |
| permissions: | |
| contents: read # Read permission is usually sufficient for source code | |
| pages: write # REQUIRED for deploying to GitHub Pages | |
| id-token: write # REQUIRED for authenticating with the deploy action | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout 🛎️ | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies 📦 | |
| run: npm install | |
| - name: Build Site 🏗️ | |
| run: npm run build | |
| # 1. Upload the built site (your 'dist' folder) as an artifact | |
| - name: Upload Artifact ⬆️ | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: './dist' # This must match your output folder | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} # The final URL output | |
| runs-on: ubuntu-latest | |
| needs: build # This job must wait for the 'build' job to finish | |
| steps: | |
| - name: Deploy to GitHub Pages 🚀 | |
| id: deployment | |
| uses: actions/deploy-pages@v4 # This official action handles the final deployment |