Skip to content

Commit

Permalink
Update CI to use an action
Browse files Browse the repository at this point in the history
  • Loading branch information
m-abdelwahab committed Jun 9, 2024
1 parent ceac1d4 commit 9dbef19
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/deploy-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,19 @@ jobs:

- run: bun run build --filter=api

- run: |
echo "{
\"DATABASE_URL\": \"${{ secrets.DATABASE_URL }}\",
\"COOKIE_SECRET\": \"${{ secrets.COOKIE_SECRET }}\",
\"NEON_API_KEY\": \"${{ secrets.NEON_API_KEY }}\",
\"APP_URL\": \"${{ secrets.APP_URL }}\",
\"CLOUDFLARE_TURNSTILE_SECRET_KEY\": \"${{ secrets.CLOUDFLARE_TURNSTILE_SECRET_KEY }}\",
\"UPSTASH_REDIS_REST_URL\": \"${{ secrets.UPSTASH_REDIS_REST_URL }}\",
\"UPSTASH_REDIS_REST_TOKEN\": \"${{ secrets.UPSTASH_REDIS_REST_TOKEN }}\",
\"CLOUDFLARE_API_TOKEN\": \"${{ secrets.CLOUDFLARE_API_TOKEN }}\",
\"CLOUDFLARE_ACCOUNT_ID\": \"${{ secrets.CLOUDFLARE_ACCOUNT_ID }}\"
}" > secrets.json
- uses: antfu/action-write-config
with:
path: 'secrets.json'
data:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
COOKIE_SECRET: ${{ secrets.COOKIE_SECRET }}
NEON_API_KEY: ${{ secrets.NEON_API_KEY }}
APP_URL: ${{ secrets.APP_URL }}
CLOUDFLARE_TURNSTILE_SECRET_KEY: ${{ secrets.CLOUDFLARE_TURNSTILE_SECRET_KEY }}
UPSTASH_REDIS_REST_URL: ${{ secrets.UPSTASH_REDIS_REST_URL }}
UPSTASH_REDIS_REST_TOKEN: ${{ secrets.UPSTASH_REDIS_REST_TOKEN }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}

- name: Upload secrets
uses: cloudflare/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion apps/api/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Instant Postgres API
# Instant Postgres API

0 comments on commit 9dbef19

Please sign in to comment.