Skip to content

Merge pull request #48 from SMUGitGeeks/SBRP-109-V2 #29

Merge pull request #48 from SMUGitGeeks/SBRP-109-V2

Merge pull request #48 from SMUGitGeeks/SBRP-109-V2 #29

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: cicd
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: client/package-lock.json
- run: npm ci
working-directory: ./client
env:
CI: false
- run: npm run build --if-present
working-directory: ./client
env:
CI: false
- run: npm test
working-directory: ./client
env:
CI: false
deployment:
name: Render Deployment
runs-on: ubuntu-latest
needs: [build]
environment: Production
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
steps:
- name: Trigger deployment
uses: sws2apps/[email protected]
with:
serviceId: ${{ secrets.RENDER_SERVICE_ID }}
apiKey: ${{ secrets.RENDER_API_KEY }}
multipleDeployment: false