Update deploy.yml #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Upload File to Linux Server | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install Git | |
run: | | |
choco install openssh -y | |
- name: Upload file via SCP | |
env: | |
SERVER_HOST: ${{ secrets.SERVER_HOST }} | |
run: | | |
ssh | |
cat package.json | |
echo "SERVER_HOST is: $env:SERVER_HOST " | |
echo "${{ secrets.SSH_PRIVATE_KEY }}" > private_key.ppk | |
cat private_key.ppk | |
ssh -i private_key.ppk root@fsharechat.cn | |
echo "login in fsharechat" | |
# echo "SSHPASS=${{ secrets.SSH_PASSWORD }}" >> $GITHUB_ENV | |
# scp -o StrictHostKeyChecking=no -P 22 build root@fsharechat.cn:/data/temp-release/windows |