deploy-www.yml 921 B

12345678910111213141516171819202122232425262728293031323334353637
  1. name: deploy-www
  2. on:
  3. push:
  4. branches:
  5. - dev
  6. - v2
  7. workflow_dispatch:
  8. concurrency:
  9. group: deploy-www-${{ github.ref_name }}
  10. cancel-in-progress: false
  11. permissions:
  12. contents: read
  13. jobs:
  14. deploy:
  15. if: github.repository == 'anomalyco/opencode' && (github.ref_name == 'dev' || github.ref_name == 'v2')
  16. runs-on: ubuntu-latest
  17. steps:
  18. - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
  19. - uses: ./.github/actions/setup-bun
  20. - name: Build
  21. working-directory: packages/www
  22. run: bun run build
  23. env:
  24. BLUME_ENV: ${{ github.ref_name == 'v2' && 'production' || 'dev' }}
  25. CLOUDFLARE_ENV: ${{ github.ref_name == 'v2' && 'production' || 'dev' }}
  26. - name: Deploy
  27. working-directory: packages/www
  28. run: bun run deploy
  29. env:
  30. CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}