Rename workflow to pages.yml with correct branch case #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: Deploy to GitHub Pages | |
| on: | |
| push: | |
| branches: [Testing] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Create env.js with secrets | |
| run: | | |
| echo "// Environment configuration (injected at build time)" > js/env.js | |
| echo "window.env = {" >> js/env.js | |
| echo " SUPABASE_URL: '${{ secrets.SUPABASE_URL }}'," >> js/env.js | |
| echo " SUPABASE_ANON_KEY: '${{ secrets.SUPABASE_ANON_KEY }}'" >> js/env.js | |
| echo "};" >> js/env.js | |
| cat js/env.js | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: '.' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |