i don't know #4
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 Portfolio to GitHub Pages" | |
| # Run this workflow on pushes to the main branch | |
| on: | |
| push: | |
| branches: | |
| - main | |
| # Sets the permissions for the GitHub token to allow deployment | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Allow only one concurrent deployment | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| # Build job: prepares the website files | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository 🛎️ | |
| uses: actions/checkout@v4 | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Find and Replace Token 🗝️ | |
| uses: jacobtomlinson/gha-find-replace@v3 | |
| with: | |
| find: "YOUR_HUGGING_FACE_TOKEN_HERE" | |
| replace: ${{ secrets.HF_TOKEN_AKARSHANJAISWALGITHUBIO }} | |
| include: "index2.html" | |
| - name: Upload artifact 📦 | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| # This uploads the entire repository, now with the token-replaced index2.html | |
| path: '.' | |
| # Deploy job: takes the prepared files and publishes them | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages 🚀 | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |