Update deploy.yml #13
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: Set up Python | |
uses: actions/setup-python@v2 | |
- name: Install Git | |
run: | | |
choco install git -y | |
choco install openssh -y | |
choco install putty -y | |
- name: Set up Git Bash | |
run: | | |
echo 'export PATH="/usr/bin:$PATH"' >> $GITHUB_ENV | |
- name: Upload file via SCP | |
run: | | |
dir | |
git version | |
ssh | |
"C:\Program Files\PuTTY\pscp.exe" -batch -scp -v -pw ${{ secrets.SSH_PASSWORD }} -i key.ppk -P 22 -l root -s command.txt | |
ssh root@fsharechat.cn | |
echo "SSHPASS=${{ secrets.SSH_PASSWORD }}" >> $GITHUB_ENV | |
scp -o StrictHostKeyChecking=no -P 22 build root@fsharechat.cn:/data/temp-release/windows |