fix: secrets #8
This file contains 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 Cloudflare Pages | |
on: [push] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
deployments: write | |
name: Deploy to Cloudflare Pages | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 # Use the version of pnpm you need | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' # Use the Node.js version your project requires | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: setup environment variables | |
run: | | |
touch .env | |
echo DATABASE_URL=${{ secrets.DATABASE_URL }} >> .env | |
echo TURSO_AUTH_TOKEN=${{ secrets.TURSO_AUTH_TOKEN }} >> .env | |
echo STRIPE_SECRET_KEY=${{ secrets.STRIPE_SECRET_KEY }} >> .env | |
echo NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=${{ secrets.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY }} >> .env | |
echo STRIPE_WEBHOOK_SECRET=${{ secrets.STRIPE_WEBHOOK_SECRET }} >> .env | |
echo RESEND_API_KEY=${{ secrets.RESEND_API_KEY }} >> .env | |
echo EMAIL_FROM=${{ secrets.EMAIL_FROM }} >> .env | |
- name: Deploy | |
env: | |
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }} | |
CLOUDFLARE_PROJECT_NAME: ${{ vars.CLOUDFLARE_PROJECT_NAME }} | |
run: pnpm run deploy |