Skip to content

Commit

Permalink
Merge pull request #9 from kimitrii/kimitri
Browse files Browse the repository at this point in the history
Create wrangler.toml dynamically in GitHub Actions with secure secrets management
  • Loading branch information
kimitrii authored Nov 25, 2024
2 parents 8bd12f9 + 30ac40d commit 0571724
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/deploy-cloudflare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@ jobs:
with:
version: 9

- name: Create wrangler.toml dynamically
run: |
cat <<EOF > wrangler.toml
name = "${{ secrets.PROJECT_NAME }}"
main = "src/index.ts"
compatibility_date = "2024-11-20"
compatibility_flags = ["nodejs_compat"]
[[d1_databases]]
binding = "DB"
database_name = "${{ secrets.D1_DATABASE_NAME }}"
database_id = "${{ secrets.D1_DATABASE_ID }}"
migrations_dir = "./src/migrations"
EOF
- name: Run Tests, Migrations and Deploy using Cloudflare CLI environment
uses: cloudflare/wrangler-action@v3
with:
Expand Down

0 comments on commit 0571724

Please sign in to comment.