update cicd pipeline to run on self hosted ec2 instance #9
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: splitBhai Backend | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: self-hosted | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- name: checkout code repo | |
uses: actions/checkout@v3 | |
- name: set up node js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
cache: "npm" | |
- name: install dependencies | |
run: npm ci | |
- name: create env files | |
run: | | |
touch .env | |
echo "${{secrets.PROD_ENV_FILE}}" > .env |