diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..6c7c3cc --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,26 @@ +name: Deploy + +on: push + +jobs: + test-and-deploy: + name: Test & Deploy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: '18' + + - name: Install + run: npm ci + + - name: Test + run: npm run test + + - name: Deploy + run: npm run deploy + env: + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..a538523 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,21 @@ +name: Test + +on: push + +jobs: + test-and-deploy: + name: Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: '18' + + - name: Install + run: npm ci + + - name: Test + run: npm run test diff --git a/wrangler.toml b/wrangler.toml index a140e05..10da279 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -1,6 +1,7 @@ name = "preview-builds" main = "src/index.ts" compatibility_date = "2023-06-21" +account_id = "4e599df4216133509abaac54b109a647" route = { pattern = "preview-builds.walshy.dev/*", zone_name = "walshy.dev" } [[r2_buckets]]