This commit is contained in:
@@ -22,22 +22,12 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
- name: Check environment
|
|
||||||
run: |
|
|
||||||
cat /etc/os-release
|
|
||||||
which apt-get || echo "no apt-get"
|
|
||||||
which apk || echo "no apk"
|
|
||||||
which ssh || echo "no ssh"
|
|
||||||
which scp || echo "no scp"
|
|
||||||
|
|
||||||
- name: Deploy to Synology
|
- name: Deploy to Synology
|
||||||
env:
|
env:
|
||||||
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
|
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
|
||||||
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
|
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
|
||||||
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
|
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
|
||||||
run: |
|
run: |
|
||||||
apk add --no-cache openssh-client
|
|
||||||
|
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "$DEPLOY_KEY" > ~/.ssh/id_ed25519
|
echo "$DEPLOY_KEY" > ~/.ssh/id_ed25519
|
||||||
chmod 600 ~/.ssh/id_ed25519
|
chmod 600 ~/.ssh/id_ed25519
|
||||||
@@ -46,3 +36,4 @@ jobs:
|
|||||||
tar -czf /tmp/dist.tar.gz -C dist .
|
tar -czf /tmp/dist.tar.gz -C dist .
|
||||||
scp /tmp/dist.tar.gz ${DEPLOY_USER}@${DEPLOY_HOST}:/volume1/web/app/
|
scp /tmp/dist.tar.gz ${DEPLOY_USER}@${DEPLOY_HOST}:/volume1/web/app/
|
||||||
ssh ${DEPLOY_USER}@${DEPLOY_HOST} "cd /volume1/web/app && tar -xzf dist.tar.gz && rm dist.tar.gz"
|
ssh ${DEPLOY_USER}@${DEPLOY_HOST} "cd /volume1/web/app && tar -xzf dist.tar.gz && rm dist.tar.gz"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user