fix: add alpine container to deploy job for shared hosting compatibility
This commit is contained in:
@@ -86,8 +86,10 @@ jobs:
|
|||||||
# DEPLOY (manual): to shared hosting via SSH
|
# DEPLOY (manual): to shared hosting via SSH
|
||||||
# ──────────────────────────────────────────────
|
# ──────────────────────────────────────────────
|
||||||
deploy:
|
deploy:
|
||||||
name: Deploy to production
|
name: Deploy to shared hosting
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: alpine:3.20
|
||||||
if: github.ref == 'refs/heads/develop'
|
if: github.ref == 'refs/heads/develop'
|
||||||
needs: [lint, build]
|
needs: [lint, build]
|
||||||
environment:
|
environment:
|
||||||
@@ -97,17 +99,17 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Download build artifacts
|
- name: Install SSH and rsync
|
||||||
|
run: |
|
||||||
|
apk add --no-cache openssh-client sshpass rsync
|
||||||
|
|
||||||
|
- name: Download built artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: dist
|
name: dist
|
||||||
path: dist/
|
path: dist/
|
||||||
|
|
||||||
- name: Install SSH client
|
- name: Deploy built files to shared hosting
|
||||||
run: |
|
|
||||||
apk add --no-cache openssh-client sshpass rsync
|
|
||||||
|
|
||||||
- name: Deploy via rsync
|
|
||||||
run: |
|
run: |
|
||||||
sshpass -p "${{ secrets.SSH_PASSWORD }}" rsync -avz --delete \
|
sshpass -p "${{ secrets.SSH_PASSWORD }}" rsync -avz --delete \
|
||||||
-e "ssh -p ${{ vars.SSH_PORT || 22 }} -o StrictHostKeyChecking=no" \
|
-e "ssh -p ${{ vars.SSH_PORT || 22 }} -o StrictHostKeyChecking=no" \
|
||||||
|
|||||||
Reference in New Issue
Block a user