Skip to content

Update pipeline.yml

Update pipeline.yml #3

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: App 'Library' CI/CD
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
runs-on: ubunto-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'npm'
- name: Install npm
run: npm install
- name: Run tests
run: npm test
deploy:
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Deploy to production
uses: johnbeynon/render-deploy-action@v0.0.8
with:
service-id: ${{ secrets.LibraryServiceID }}
api-key: ${{ secrets.LibraryAppKey }}