Skip to content

Commit 052202d

Browse files
committed
refactor
1 parent f5532f8 commit 052202d

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

.github/workflows/offlinedocs.yaml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,18 @@ concurrency:
2020
jobs:
2121
fmt:
2222
name: fmt
23-
runs-on: ubuntu-latest
23+
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
2424
steps:
2525
- name: Checkout
2626
uses: actions/checkout@v3
2727

2828
- name: Install Pretier
2929
run: |
3030
cd offlinedocs
31-
yarn
31+
mv package.json package.json.bak
32+
jq '{dependencies: {prettier: .devDependencies.prettier}}' < package.json.bak > package.json
33+
yarn --frozen-lockfile
34+
mv package.json.bak package.json
3235
3336
- name: Check format
3437
run: |
@@ -37,13 +40,17 @@ jobs:
3740
3841
lint:
3942
name: lint
40-
runs-on: ubuntu-latest
43+
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
4144
steps:
4245
- name: Checkout
4346
uses: actions/checkout@v3
4447

4548
- name: Setup Node
46-
uses: ./.github/actions/setup-node
49+
uses: buildjet/setup-node@v3
50+
with:
51+
node-version: 16.20.1
52+
cache: "yarn"
53+
cache-dependency-path: "offlinedocs/yarn.lock"
4754

4855
- name: lint
4956
run: |
@@ -52,13 +59,17 @@ jobs:
5259
5360
build:
5461
name: build
55-
runs-on: ubuntu-latest
62+
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
5663
steps:
5764
- name: Checkout
5865
uses: actions/checkout@v3
5966

6067
- name: Setup Node
61-
uses: ./.github/actions/setup-node
68+
uses: buildjet/setup-node@v3
69+
with:
70+
node-version: 16.20.1
71+
cache: "yarn"
72+
cache-dependency-path: "offlinedocs/yarn.lock"
6273

6374
- name: Build
6475
run: |

0 commit comments

Comments
 (0)