Skip to content

Commit

Permalink
Add workflow for test + deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
WalshyDev committed Jun 24, 2023
1 parent dffe6d9 commit 4181648
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -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 }}
21 changes: 21 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions wrangler.toml
Original file line number Diff line number Diff line change
@@ -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]]
Expand Down

0 comments on commit 4181648

Please sign in to comment.