Skip to content

Commit 71903ca

Browse files
committed
Fix netlify deploy
1 parent cced6ad commit 71903ca

File tree

5 files changed

+7670
-265
lines changed

5 files changed

+7670
-265
lines changed

.github/workflows/deploy.yml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
workflow_dispatch:
77
push:
88
paths:
9-
- .github/workflows/production:deploy.yml
9+
- .github/workflows/deploy.yml
1010
- '@client/**'
1111
branches:
1212
- main
@@ -19,17 +19,18 @@ jobs:
1919
- uses: actions/setup-node@v3
2020
with:
2121
node-version: 16
22+
2223
- name: Get yarn cache directory path
2324
id: yarn-cache-dir-path
2425
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
2526

26-
# - uses: actions/cache@v3
27-
# id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
28-
# with:
29-
# path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
30-
# key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
31-
# restore-keys: |
32-
# ${{ runner.os }}-yarn-
27+
- uses: actions/cache@v3
28+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
29+
with:
30+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
31+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
32+
restore-keys: |
33+
${{ runner.os }}-yarn-
3334
3435
- name: Install dependancies
3536
run: yarn install
@@ -47,13 +48,8 @@ jobs:
4748
GA_TRACKING_ID: ${{ secrets.GA_TRACKING_ID }}
4849

4950
- name: Deploy to netlify
50-
uses: jsmrcaga/action-netlify-deploy@master
51-
with:
52-
build_directory: '@client/build/client'
53-
functions_directory: '@client/build/functions'
54-
install_command: 'echo Skipping installing the dependencies'
55-
build_command: 'echo Skipping building the web files'
56-
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
57-
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
58-
NETLIFY_DEPLOY_MESSAGE: 'Actions deploy ${{ github.ref_name }}'
59-
NETLIFY_DEPLOY_TO_PROD: true
51+
run: |
52+
export NETLIFY_SITE_ID=${{ secrets.NETLIFY_SITE_ID }}
53+
export NETLIFY_AUTH_TOKEN=${{ secrets.NETLIFY_AUTH_TOKEN }}
54+
55+
yarn netlify deploy --dir='./@client/build/client' --functions='./@client/build/functions' --message='Actions deploy ${{ github.ref_name }}' --prod

.github/workflows/preview.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ jobs:
1919
id: yarn-cache-dir-path
2020
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
2121

22-
# - uses: actions/cache@v3
23-
# id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
24-
# with:
25-
# path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
26-
# key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
27-
# restore-keys: |
28-
# ${{ runner.os }}-yarn-
22+
- uses: actions/cache@v3
23+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
24+
with:
25+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
26+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
27+
restore-keys: |
28+
${{ runner.os }}-yarn-
2929
3030
- name: Install dependancies
3131
run: yarn install

.github/workflows/tweet.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ jobs:
1717
id: yarn-cache-dir-path
1818
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
1919

20-
# - uses: actions/cache@v3
21-
# id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
22-
# with:
23-
# path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
24-
# key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
25-
# restore-keys: |
26-
# ${{ runner.os }}-yarn-
20+
- uses: actions/cache@v3
21+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
22+
with:
23+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
24+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
25+
restore-keys: |
26+
${{ runner.os }}-yarn-
2727
2828
- name: Install dependancies
2929
run: yarn install

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"devDependencies": {
2323
"@package/scripts": "workspace:^",
2424
"esbuild": "^0.18.5",
25+
"netlify-cli": "^16.4.0",
2526
"prettier": "^2.8.8",
2627
"typescript": "5.0.2"
2728
},

0 commit comments

Comments
 (0)