Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/node_modules/**

13 changes: 0 additions & 13 deletions .github/FUNDING.yml

This file was deleted.

33 changes: 33 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Shopify Landing Page
on:
push:
branches:
- main
jobs:
getUbuntuMachine:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Copy Files Into EC2
uses: appleboy/scp-action@master
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USERNAME }}
key: ${{ secrets.EC2_KEY }}
source: "."
target: /home/${{ secrets.EC2_USERNAME }}/shopify-landing

- name: SSH into EC2 then Build and Run Docker
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USERNAME }}
key: ${{ secrets.EC2_KEY }}
script: |
cd /home/${{ secrets.EC2_USERNAME }}/shopify-landing
docker stop shopify_landing || true
docker rm shopify_landing || true
docker build -t shopify_landing_image .
docker run -d -p 80:3000 --name shopify_landing shopify_landing_image
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM node:18-alpine
WORKDIR /app
COPY package*.json .
RUN npm install
COPY . .
CMD ["npm", "run", "dev"]

Loading