Skip to content

deploy app to aws-3.5 #4

deploy app to aws-3.5

deploy app to aws-3.5 #4

Workflow file for this run

name: ecom-deploy
on:
push:
branches:
- main
jobs:
build:
name: Install Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout source repo
uses: actions/checkout@v4
- name: Login to Docker Hub
# run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASS }}
run: echo "${{ secrets.DOCKER_PASS }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
- name: Build Docker image
run: docker build -t arkostar/shirtup .
- name: Publish image to Docker Hub
run: docker push arkostar/shirtup:latest
- name: Setup Node.js
uses: actions/setup-node@v2
deploy:
needs: build
runs-on: self-hosted
steps:
- name: Pull image from Docker Hub
run: docker pull arkostar/shirtup:latest
- name: Run Docker Container
run: docker run -d -p 5000:5000 --name node-js-Ecom-container -e MOGODB_PASS= `${{ secrets.MOGODB_PASS}}` arkostar/shirtup