build: update backend SERVER_PATH #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CD | |
on: | |
push: | |
branches: | |
- main | |
env: | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
NETLIFY_ACCESS_TOKEN: ${{ secrets.NETLIFY_ACCESS_TOKEN }} | |
SERVER_PATH: https://nutrition-tracker-api.netlify.app/.netlify/functions/serverless/api/v1 | |
jobs: | |
CD: | |
runs-on: ubuntu-latest | |
name: | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Set up nodejs version 16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: 'npm' | |
- name: Install netlify-cli | |
run: npm install -g netlify-cli | |
- name: Install package dependencies | |
run: npm install | |
- name: Build production static directory | |
run: npm run build | |
- name: Deploy | |
run: netlify deploy --site $NETLIFY_SITE_ID --auth $NETLIFY_ACCESS_TOKEN --prod --dir=./.output |