Add container specification and shell definitions to deployment workflows
Some checks failed
Deploy Development / deploy (push) Failing after 4m25s

This commit is contained in:
Frank John Begornia
2025-12-13 02:58:29 +08:00
parent fa59a081d8
commit af0d8cd9ac
3 changed files with 14 additions and 0 deletions

View File

@@ -9,6 +9,8 @@ on:
jobs:
build-and-push:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout code

View File

@@ -9,9 +9,12 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout code
shell: sh
run: |
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git /workspace/repo || true
cd /workspace/repo
@@ -20,12 +23,14 @@ jobs:
git pull origin $GITHUB_REF_NAME
- name: Build Docker Image
shell: sh
run: |
cd /workspace/repo
docker build -t merchbay_admin:dev .
docker save merchbay_admin:dev | gzip > merchbay_admin_dev.tar.gz
- name: Setup SSH and Deploy
shell: sh
run: |
mkdir -p ~/.ssh
printf '%s' "$DEPLOY_SSH_KEY" > ~/.ssh/deploy_key
@@ -80,6 +85,7 @@ jobs:
DEV_DB_PASSWORD: ${{ secrets.DEV_DB_PASSWORD }}
- name: Health Check
shell: sh
run: |
sleep 10
curl -f https://dev.merchbay.app || exit 1

View File

@@ -10,9 +10,12 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout code
shell: sh
run: |
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git /workspace/repo || true
cd /workspace/repo
@@ -21,12 +24,14 @@ jobs:
git pull origin $GITHUB_REF_NAME
- name: Build Docker Image
shell: sh
run: |
cd /workspace/repo
docker build -t merchbay_admin:latest .
docker save merchbay_admin:latest | gzip > merchbay_admin.tar.gz
- name: Setup SSH and Deploy
shell: sh
run: |
mkdir -p ~/.ssh
printf '%s' "$PROD_DEPLOY_SSH_KEY" > ~/.ssh/deploy_key
@@ -81,6 +86,7 @@ jobs:
PROD_DB_PASSWORD: ${{ secrets.PROD_DB_PASSWORD }}
- name: Health Check
shell: sh
run: |
sleep 10
curl -f https://merchbay.com || exit 1