Skip to content

Commit 0a0e50c

Browse files
refactor: cleanup website ci jobs (#1745)
1 parent c47220b commit 0a0e50c

File tree

2 files changed

+22
-15
lines changed

2 files changed

+22
-15
lines changed

.github/workflows/ci.yml

-13
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,3 @@ jobs:
8080

8181
- name: Test in legacy mode
8282
run: CONCURRENT_MODE=0 yarn test:ci
83-
84-
test-website:
85-
runs-on: ubuntu-latest
86-
name: Test Website
87-
steps:
88-
- name: Checkout
89-
uses: actions/checkout@v4
90-
91-
- name: Setup Node.js and website deps
92-
uses: ./.github/actions/setup-website-deps
93-
94-
- name: Build website
95-
run: yarn --cwd website build

.github/workflows/deploy-website.yml .github/workflows/website.yml

+22-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,31 @@ on:
44
push:
55
branches: [main]
66
paths: ['website/**']
7+
pull_request:
8+
branches: ['**']
9+
paths: ['website/**']
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: ${{ !contains(github.ref, 'main')}}
714

815
jobs:
16+
test:
17+
runs-on: ubuntu-latest
18+
name: Test Website
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Setup Node.js and website deps
24+
uses: ./.github/actions/setup-website-deps
25+
26+
- name: Build website
27+
run: yarn --cwd website build
28+
929
deploy:
1030
name: Deploy to GitHub Pages
31+
if: github.ref == 'refs/heads/main'
1132
runs-on: ubuntu-latest
1233
steps:
1334
- name: Checkout
@@ -25,12 +46,11 @@ jobs:
2546
uses: peaceiris/actions-gh-pages@v3
2647
with:
2748
github_token: ${{ secrets.GITHUB_TOKEN }}
28-
# Build output to publish to the `gh-pages` branch:
2949
publish_dir: ./website/build
3050
# The following lines assign commit authorship to the official
3151
# GH-Actions bot for deploys to `gh-pages` branch:
3252
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
3353
# The GH actions bot is used by default if you didn't specify the two fields.
3454
# You can swap them out with your own user credentials.
3555
user_name: github-actions[bot]
36-
user_email: 41898282+github-actions[bot]@users.noreply.github.com
56+
user_email: 41898282+github-actions[bot]@users.noreply.github.com

0 commit comments

Comments
 (0)