Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
abuaboud committed Sep 30, 2023
2 parents 9d61359 + d500ed9 commit 1104e35
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 16 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: MRSK Deploy

on:
push:
branches:
- main

jobs:
Release:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: |
ghcr.io/activepieces/marketing:${{ github.sha }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: SSH into remote server and deploy
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEV_OPS_HOST }}
username: root
key: ${{ secrets.SSH_KEY }}
script: |
cd mrsk
docker run --rm -v $HOME/.ssh:/root/.ssh -v /var/run/docker.sock:/var/run/docker.sock -v ${PWD}/:/workdir ghcr.io/mrsked/mrsk redeploy --version ${{ github.sha }} --config-file=config/marketing.yml --skip-push
15 changes: 0 additions & 15 deletions .github/workflows/fly.yml

This file was deleted.

3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM node:18-slim AS base
RUN apt-get update && apt-get install -y curl

# Install dependencies only when needed
FROM base AS deps
Expand All @@ -20,7 +21,6 @@ WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .


# Next.js collects completely anonymous telemetry data about general usage.
# Learn more here: https://nextjs.org/telemetry
# Uncomment the following line in case you want to disable telemetry during the build.
Expand Down Expand Up @@ -51,6 +51,7 @@ COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static

ENV PORT 3000
ENV HOSTNAME localhost

# Set up entrypoint script
COPY docker-entrypoint.sh /
Expand Down

0 comments on commit 1104e35

Please sign in to comment.