test vps deployment

This commit is contained in:
dong.nguyen committed 2026-10-10 13:04:59 +07:00
1 parent 23298138e7
commit 1e747b5cb2
1 file changed
+22 -1
+22 -1
View File
@@ -20,5 +20,26 @@ jobs:
- name: List files in the repository - name: List files in the repository
run: | run: |
ls ${{ gitea.workspace }} ls ${{ gitea.workspace }}
- name: List files in dist
run: |
ls ${{ gitea.workspace }}/dist ls ${{ gitea.workspace }}/dist
- run: echo "🍏 This job's status is ${{ job.status }}." - name: Install SSH key
uses: webfactory/ssh-agent@v0.10.0
with:
ssh-private-key: ${{ secrets.DEPLOY_SSH_PRIVATE_KEY }}
- name: Add VPS to known_hosts
run: |
mkdir -p ~/.ssh
ssh-keyscan \
-p "${{ secrets.DEPLOY_SSH_PORT }}" \
"${{ secrets.DEPLOY_HOST }}" \
>> ~/.ssh/known_hosts
- name: Upload build
run: |
rsync -az --delete \
-e "ssh -p ${{ secrets.DEPLOY_SSH_PORT }}" \
dist/ \
"${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}:/opt/static-site/.incoming/"