diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 00000000..cf894842 --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,21 @@ +name: Deploy + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + - run: bun i --frozen-lockfile + - run: bun run deploy + env: + CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} diff --git a/package.json b/package.json index 2495a484..9f023cc7 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "scripts": { "build": "turbo build", "lint": "turbo lint", - "test": "turbo test" + "test": "turbo test", + "deploy": "turbo deploy" }, "workspaces": [ "examples/*", diff --git a/turbo.json b/turbo.json index 65080053..5b271084 100644 --- a/turbo.json +++ b/turbo.json @@ -16,6 +16,9 @@ "dev": { "persistent": true, "cache": false + }, + "deploy": { + "dependsOn": ["^deploy"] } } }