diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml new file mode 100644 index 0000000..880a2f7 --- /dev/null +++ b/.github/workflows/prod.yml @@ -0,0 +1,21 @@ +on: + push: + branches: + - prod +jobs: + deploy: + runs-on: ubuntu-latest + name: Deploy + steps: + - uses: actions/checkout@v3 + - name: Deploy app + uses: cloudflare/wrangler-action@v3 + with: + apiToken: ${{ secrets.CF_API_TOKEN }} + command: deploy --env prod + secrets: | + LABRINTH_ADMIN_KEY + RATE_LIMIT_IGNORE_KEY + env: + LABRINTH_ADMIN_KEY: ${{ secrets.LABRINTH_ADMIN_SECRET_PROD }} + RATE_LIMIT_IGNORE_KEY: ${{ secrets.RATE_LIMIT_IGNORE_KEY_PROD }} diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml new file mode 100644 index 0000000..555fd66 --- /dev/null +++ b/.github/workflows/staging.yml @@ -0,0 +1,21 @@ +on: + push: + branches: + - master +jobs: + deploy: + runs-on: ubuntu-latest + name: Deploy + steps: + - uses: actions/checkout@v3 + - name: Deploy app + uses: cloudflare/wrangler-action@v3 + with: + apiToken: ${{ secrets.CF_API_TOKEN }} + command: deploy --env staging + secrets: | + LABRINTH_ADMIN_KEY + RATE_LIMIT_IGNORE_KEY + env: + LABRINTH_ADMIN_KEY: ${{ secrets.LABRINTH_ADMIN_SECRET_DEV }} + RATE_LIMIT_IGNORE_KEY: ${{ secrets.RATE_LIMIT_IGNORE_KEY_DEV }} diff --git a/wrangler.toml b/wrangler.toml index feb981a..a281829 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -1,6 +1,7 @@ name = "sisyphus" main = "src/index.ts" compatibility_date = "2023-10-30" +account_id = "9ddae624c98677d68d93df6e524a6061" [vars] LABRINTH_URL = "http://127.0.0.1:8000/v2/"