Skip to content

Commit 31b709a

Browse files
authored
PATCH: Fix CI Deploy
1 parent f4d287c commit 31b709a

File tree

1 file changed

+25
-23
lines changed

1 file changed

+25
-23
lines changed

.github/workflows/deploy.yml

+25-23
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ on:
66
- master
77
paths-ignore:
88
- .github/**
9-
# manual trigger
9+
1010
workflow_dispatch:
1111

1212
jobs:
1313
# Wait for up to a minute for previous run to complete, abort if not done by then
1414
pre-run:
1515
runs-on: ubuntu-latest
16-
timeout-minutes: 15
16+
timeout-minutes: 20
1717
steps:
1818
- name: 'Block Concurrent Executions'
1919
uses: softprops/turnstyle@v1
@@ -31,14 +31,14 @@ jobs:
3131
changelog: ${{ steps.github_tag_action.outputs.changelog }}
3232
steps:
3333
- name: Checkout
34-
uses: actions/checkout@v1
34+
uses: actions/checkout@v3
3535

3636
- name: Bump version and push tag
3737
id: github_tag_action
3838
uses: mathieudutour/[email protected]
3939
with:
4040
github_token: ${{ secrets.GITHUB_TOKEN }}
41-
release_branches: main
41+
release_branches: master
4242

4343
create_release:
4444
name: Create Release
@@ -47,32 +47,34 @@ jobs:
4747
if: ${{ needs.bump_version.outputs.new_tag != null }}
4848
steps:
4949
- name: Checkout 🛎️
50-
uses: actions/checkout@v2.3.1
50+
uses: actions/checkout@v3
5151
with:
5252
submodules: recursive
5353

5454
- name: Setup Node
55-
uses: actions/setup-node@v1
55+
uses: actions/setup-node@v3
5656
with:
57-
node-version: '14.17.0'
58-
59-
- name: Install yarn
60-
run: npm install --global yarn
57+
node-version: '16.x'
58+
- name: Get yarn cache directory path
59+
id: yarn-cache-dir-path
60+
run: echo "::set-output name=dir::$(yarn cache dir)"
6161

62-
- name: Cache dependencies
63-
uses: actions/cache@v1
62+
- uses: actions/cache@v3
63+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
6464
with:
65-
path: ~/.npm
66-
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
65+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
66+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
6767
restore-keys: |
68-
${{ runner.os }}-node-
69-
- name: Install Dependencies
70-
run: |
71-
yarn
72-
yarn install --frozen-lockfile
73-
- name: Build
74-
run: |
75-
yarn run build
68+
${{ runner.os }}-yarn-
69+
70+
- name: Install project dependencies
71+
run: yarn --prefer-offline
72+
id: install
73+
74+
- name: Install project dependencies
75+
run: yarn run build
76+
id: production
77+
7678
- name: Deploy 🚀
7779
uses: JamesIves/[email protected]
7880
with:
@@ -81,7 +83,7 @@ jobs:
8183

8284
- name: Create GitHub Release
8385
id: create_release
84-
uses: actions/[email protected].0
86+
uses: actions/[email protected].4
8587
env:
8688
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8789
with:

0 commit comments

Comments
 (0)