Skip to content

fix: change deploy config workflow #16

fix: change deploy config workflow

fix: change deploy config workflow #16

Workflow file for this run

name: Deploy CSlant Server
on:
push:
branches:
- main
jobs:
deploy:
runs-on: self-hosted
steps:
- name: Deploy to Remote Host
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.REMOTE_HOST_WEB_2 }}
username: ${{ secrets.REMOTE_USERNAME_WEB_2 }}
password: ${{ secrets.REMOTE_PASS_WEB_2 }}
key: ${{ secrets.SSH_PRIVATE_KEY_WEB_2 }}
port: ${{ secrets.REMOTE_PORT_WEB_2 }}
script: |
cd ${{ secrets.DOCS_RUNNER_PATH }}
${{ secrets.DOCS_RUNNER_COMMAND }}
sync-build:
runs-on: self-hosted
needs: deploy
steps:
- name: Sync build
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.REMOTE_HOST_WEB_2 }}
username: ${{ secrets.REMOTE_USERNAME_WEB_2 }}
password: ${{ secrets.REMOTE_PASS_WEB_2 }}
key: ${{ secrets.SSH_PRIVATE_KEY_WEB_2 }}
port: ${{ secrets.REMOTE_PORT_WEB_2 }}
script: |
rsync -avz --delete ${{ vars.DOCS_PATH_WEB_2 }}/build/ ${{ vars.NGINX_SERVER_NAME }}:${{ vars.NGINX_SERVER_SYNC_PATH }}/docs/