deploy.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. name: deploy
  2. on:
  3. push:
  4. branches:
  5. - dev
  6. - production
  7. workflow_dispatch:
  8. concurrency: ${{ github.workflow }}-${{ github.ref }}
  9. jobs:
  10. deploy:
  11. runs-on: blacksmith-4vcpu-ubuntu-2404
  12. steps:
  13. - uses: actions/checkout@v3
  14. - uses: ./.github/actions/setup-bun
  15. - uses: actions/setup-node@v4
  16. with:
  17. node-version: "24"
  18. # Workaround for Pulumi version conflict:
  19. # GitHub runners have Pulumi 3.212.0+ pre-installed, which removed the -root flag
  20. # from pulumi-language-nodejs (see https://github.com/pulumi/pulumi/pull/21065).
  21. # SST 3.17.x uses Pulumi SDK 3.210.0 which still passes -root, causing a conflict.
  22. # Removing the system language plugin forces SST to use its bundled compatible version.
  23. # TODO: Remove when sst supports Pulumi >3.210.0
  24. - name: Fix Pulumi version conflict
  25. run: sudo rm -f /usr/local/bin/pulumi-language-nodejs
  26. - run: bun sst deploy --stage=${{ github.ref_name }}
  27. env:
  28. CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
  29. PLANETSCALE_SERVICE_TOKEN_NAME: ${{ secrets.PLANETSCALE_SERVICE_TOKEN_NAME }}
  30. PLANETSCALE_SERVICE_TOKEN: ${{ secrets.PLANETSCALE_SERVICE_TOKEN }}
  31. STRIPE_SECRET_KEY: ${{ github.ref_name == 'production' && secrets.STRIPE_SECRET_KEY_PROD || secrets.STRIPE_SECRET_KEY_DEV }}