Merge pull request #9 from dead8309/firebase #12
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: Build and Deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-deploy: | |
runs-on: self-hosted | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Build Docker image | |
run: docker build -t iot-lab-kiit/faculty-api-nodejs-image:v1 . | |
- name: Stop and Remove old container | |
run: | | |
docker stop faculty-api-container || true | |
docker rm faculty-api-container || true | |
- name: Start new container | |
run: docker run -d --name faculty-api-container -p 6201:3030 iot-lab-kiit/faculty-api-nodejs-image:v1 |