Skip to content

Commit

Permalink
Update node.js.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
salman-aziz-4425 authored Dec 26, 2023
1 parent 29090e4 commit f9fcb60
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,28 @@ jobs:
cache: 'npm'

- name: Install Dependencies
run: npm ci
run: |
npm ci
nohup npm run dev
docker-build:
runs-on: self-hosted
needs: build
steps:
- name: Checkout Repository
uses: actions/checkout@v3
# docker-build:
# runs-on: self-hosted
# needs: build
# steps:
# - name: Checkout Repository
# uses: actions/checkout@v3

- name: Build Docker Image
run: |
sudo docker build -t instagram-reimaged-fe:latest .
sudo docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
sudo docker push salman4425/instagram-frontend-fe:instagram-reimaged-fe:latest
# - name: Build Docker Image
# run: |
# sudo docker build -t instagram-reimaged-fe:latest .
# sudo docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
# sudo docker push salman4425/instagram-frontend-fe:instagram-reimaged-fe:latest

deploy:
runs-on: self-hosted
needs: docker-build
steps:
- name: Deploy with Docker
run: |
sudo docker pull instagram-reimaged-fe:latest
sudo docker run -d -p 3000:3001 --name instagram-reimaged-fe:latest
# deploy:
# runs-on: self-hosted
# needs: docker-build
# steps:
# - name: Deploy with Docker
# run: |
# sudo docker pull instagram-reimaged-fe:latest
# sudo docker run -d -p 3000:3001 --name instagram-reimaged-fe:latest

0 comments on commit f9fcb60

Please sign in to comment.