Skip to content

Commit

Permalink
Include more checks in the deploy workflow
Browse files Browse the repository at this point in the history
Looks like workflow_on is not supported by one of the deno actions. So I
can't use it for the deploy workflow to depend on the test workflow.
This introduces some duplication but I care more about not deploying
when tests are failing and that much duplication is fine for me for the
time being.
  • Loading branch information
franekmagiera committed Feb 11, 2024
1 parent d39b3e7 commit 17cece9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
name: Deploy
on:
workflow_run:
workflows: [Test]
push:
branches: [main]
types: [completed]

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest

if: ${{ github.event.workflow_run.conclusion == 'success' }}

permissions:
id-token: write # Needed for auth with Deno Deploy
contents: read # Needed to clone the repository
Expand All @@ -24,6 +20,15 @@ jobs:
uses: denoland/setup-deno@v1
with:
deno-version: v1.39.4

- name: Check formatting
run: "deno fmt --check"

- name: Lint
run: "deno lint"

- name: Test
run: "deno task test"

- name: Build step
run: "deno task build"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:

- name: Check formatting
run: "deno fmt --check"

- name: Lint
run: "deno lint"
run: "deno lint"

- name: Test
run: "deno task test"

0 comments on commit 17cece9

Please sign in to comment.