Advertisement
ronard_addo

deploy.yml

May 30th, 2025
464
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.78 KB | None | 0 0
  1. name: Build and Deploy to GitHub Pages
  2.  
  3. on:
  4.   push:
  5.     branches:
  6.      - main
  7.  
  8. jobs:
  9.   build:
  10.     runs-on: ubuntu-latest
  11.  
  12.     steps:
  13.       - name: Checkout code
  14.         uses: actions/checkout@v3
  15.  
  16.       - name: Inject Supabase secrets into config.js ES module
  17.         run: |
  18.          echo "export const CONFIG = {" > config.js
  19.           echo "  url: '${{ secrets.SUPABASE_URL }}'," >> config.js
  20.           echo "  key: '${{ secrets.SUPABASE_KEY }}'" >> config.js
  21.           echo "};" >> config.js
  22.  
  23.       - name: List files before deployment (debugging)
  24.         run: ls -al
  25.  
  26.       - name: Deploy to GitHub Pages
  27.         uses: peaceiris/actions-gh-pages@v3
  28.         with:
  29.           github_token: ${{ secrets.GITHUB_TOKEN }}
  30.           publish_dir: ./
  31.           add: true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement