Skip to content

Commit

Permalink
Merge branch 'refs/heads/main' into stable
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/deploy-prod.yaml
#	.github/workflows/deploy-staging.yaml
#	deploy.sh
  • Loading branch information
Zeragamba committed May 26, 2024
2 parents d7869b3 + 1f942be commit 6ea06ed
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/deploy-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@ jobs:
steps:
- name: Run remote script
uses: appleboy/[email protected]
env:
DEPLOY_SHA: ${{ github.sha }}
with:
host: zeragamba.art
port: 22
username: zeradraws
key: ${{ secrets.DEPLOY_KEY }}
envs: DEPLOY_SHA
script_stop: true
script: |
cd /opt/apps/zeragamba.art
git fetch
git checkout $GITHUB_SHA
git checkout $DEPLOY_SHA
./deploy.sh
5 changes: 4 additions & 1 deletion .github/workflows/deploy-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@ jobs:
steps:
- name: Run remote script
uses: appleboy/[email protected]
env:
DEPLOY_SHA: ${{ github.sha }}
with:
host: zeragamba.art
port: 22
username: zeradraws
key: ${{ secrets.DEPLOY_KEY }}
envs: DEPLOY_SHA
script_stop: true
script: |
cd /opt/apps/staging.zeragamba.art
git fetch
git checkout $GITHUB_SHA
git checkout $DEPLOY_SHA
./deploy.sh
2 changes: 1 addition & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CUR_DEPLOY_SHA=$(git rev-parse HEAD)
echo "Deploying: $LAST_DEPLOY_SHA -> $CUR_DEPLOY_SHA"

echo "--- Rebuilding containers ---"
#docker compose -f docker-compose.production.yml build
docker compose -f docker-compose.production.yml build

CLIENT_CHANGED=$(git diff --quiet $LAST_DEPLOY_SHA $CUR_DEPLOY_SHA -- client && echo false || echo true)
echo "client changed: $CLIENT_CHANGED"
Expand Down

0 comments on commit 6ea06ed

Please sign in to comment.