Skip to content

Commit 55a530a

Browse files
ci: improve deploy page workflow (#51)
1 parent 67a1da2 commit 55a530a

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,6 @@ concurrency:
1111
cancel-in-progress: true
1212

1313
jobs:
14-
should-deploy:
15-
name: Check if should deploy page
16-
runs-on: ubuntu-lastest
17-
if: github.event_name == 'push' || contains(github.ref, '/heads/master')
18-
steps:
19-
- name: Write output
20-
run: echo "deploy=true" >> "$GITHUB_OUTPUT"
21-
2214
lint:
2315
name: Lint
2416
runs-on: ubuntu-latest
@@ -49,14 +41,15 @@ jobs:
4941
cache: yarn
5042
- name: Install dependencies
5143
run: yarn --immutable
52-
- name: Run typechecking
44+
- name: Typecheck
5345
continue-on-error: true
5446
run: yarn run typecheck
5547

5648
build:
5749
name: Build
5850
runs-on: ubuntu-latest
59-
needs: lint
51+
needs:
52+
- lint
6053
steps:
6154
- name: Checkout
6255
uses: actions/checkout@v4
@@ -72,10 +65,10 @@ jobs:
7265
cache: yarn
7366
- name: Install dependencies
7467
run: yarn --immutable
75-
- name: Building
68+
- name: Build
7669
run: yarn run generate
7770
- name: Upload artifact
78-
if: ${{ steps.should-deploy.outputs.deploy }}
71+
if: ${{ github.event_name == 'push' || contains(github.ref, '/heads/master') }}
7972
uses: actions/upload-pages-artifact@v3
8073
with:
8174
path: .output/public
@@ -85,7 +78,7 @@ jobs:
8578
runs-on: ubuntu-lastest
8679
needs:
8780
- build
88-
- should-deploy
81+
if: ${{ github.event_name == 'push' || contains(github.ref, '/heads/master') }}
8982
steps:
9083
- name: Deploy artifact to GitHub Pages
9184
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)