Initial clean commit #1
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 Netlify | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Generate env.js | |
| run: | | |
| echo "window.ENV = {" > env.js | |
| echo " FORMZERO_URL: '${{ secrets.FORMZERO_URL }}'," >> env.js | |
| echo " EMAIL_WORKER_URL: '${{ secrets.EMAIL_WORKER_URL }}'," >> env.js | |
| echo " SITE_URL: '${{ secrets.SITE_URL }}'" >> env.js | |
| echo "};" >> env.js | |
| echo "✅ env.js generated:" | |
| cat env.js | |
| - name: Debug - verify file exists | |
| run: | | |
| echo "Current directory: $(pwd)" | |
| ls -la env.js || echo "❌ env.js missing!" | |
| - name: Deploy to Netlify | |
| uses: nwtgck/actions-netlify@v2.0 | |
| with: | |
| publish-dir: '.' | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| deploy-message: "Deploy from GitHub Actions" | |
| env: | |
| NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
| NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} |