fix: upload release archive in deploy workflows
This commit is contained in:
17
.github/workflows/deploy-test.yml
vendored
17
.github/workflows/deploy-test.yml
vendored
@@ -18,6 +18,18 @@ jobs:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Build release archive
|
||||
run: |
|
||||
tar \
|
||||
--exclude=.git \
|
||||
--exclude=.github \
|
||||
--exclude=.venv \
|
||||
--exclude=__pycache__ \
|
||||
--exclude=node_modules \
|
||||
--exclude=backend/media \
|
||||
--exclude=backend/staticfiles \
|
||||
-czf release.tgz .
|
||||
|
||||
- name: Upload release bundle
|
||||
uses: appleboy/scp-action@v1.0.0
|
||||
with:
|
||||
@@ -25,12 +37,11 @@ jobs:
|
||||
username: ${{ secrets.TEST_DEPLOY_USER }}
|
||||
key: ${{ secrets.TEST_DEPLOY_SSH_KEY }}
|
||||
port: ${{ secrets.TEST_DEPLOY_PORT || 22 }}
|
||||
source: "."
|
||||
source: "release.tgz"
|
||||
target: ${{ secrets.TEST_DEPLOY_PATH }}
|
||||
rm: false
|
||||
overwrite: true
|
||||
strip_components: 0
|
||||
exclude: ".git,.github,.venv,__pycache__,node_modules,backend/media,backend/staticfiles"
|
||||
|
||||
- name: Deploy over SSH
|
||||
uses: appleboy/ssh-action@v1.2.0
|
||||
@@ -43,4 +54,6 @@ jobs:
|
||||
set -e
|
||||
DEPLOY_DIR="${{ secrets.TEST_DEPLOY_PATH }}"
|
||||
cd "$DEPLOY_DIR"
|
||||
tar -xzf release.tgz
|
||||
rm -f release.tgz
|
||||
RUN_DJANGO_CHECK=0 DEPLOY_HEALTH_URL="http://127.0.0.1:8088/healthz/" ./scripts/deploy_stack.sh .env.test docker-compose.prod.yml
|
||||
|
||||
Reference in New Issue
Block a user