Skip to content

deploy app to aws

deploy app to aws #1

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}}
- name: build docker image
run: docker build -t arkostar/shirtup .
- name: publish image to docker
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