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
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
0 commit comments