Skip to content

Update npm-githu.yml #99

Update npm-githu.yml

Update npm-githu.yml #99

Workflow file for this run

name: project_backend
on:
push:
branches:
- develop
jobs:
build-node:
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20' # Specify the Node.js version you're using
- name: Install dependencies
run: npm install
build-docker:
runs-on: ubuntu-latest # GitHub-hosted runner for the second job
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Login Dockerhub
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
# - name: Build the Docker image
# run: docker build -t sachin816/wizinoa1 .
# - name: Push to Dockerhub
# run: docker push sachin816/wizinoa1:latest
# deploy-docker:
# runs-on: self-hosted
# steps:
# - name: Pull Docker image
# run: sudo docker pull sachin816/wizinoa1:latest
# - name: Delete Old Docker container
# run: sudo docker rm -f node || true
# - name: Run Docker Container
# run: sudo docker run -d -p 7000:7000 --name node sachin816/wizinoa1