action
This commit is contained in:
parent
828c43e5a5
commit
062bfe95ff
1 changed files with 5 additions and 16 deletions
|
@ -1,4 +1,4 @@
|
||||||
name: Deploy Scoresniper via SFTP
|
name: Deploy Scoresniper via SCP
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -13,22 +13,11 @@ jobs:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install lftp
|
- name: Install scp and sshpass
|
||||||
run: |
|
run: |
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y lftp
|
apt-get install -y openssh-client sshpass
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Upload project files via SCP
|
||||||
run: npm install
|
|
||||||
working-directory: ScoreSniper
|
|
||||||
|
|
||||||
- name: Build project
|
|
||||||
run: npm run build
|
|
||||||
working-directory: ScoreSniper
|
|
||||||
|
|
||||||
- name: Upload via SFTP
|
|
||||||
run: |
|
run: |
|
||||||
lftp -u ${{ secrets.SFTP_USER }},${{ secrets.SFTP_PASS }} sftp://potzplitz.de <<EOF
|
sshpass -p "${{ secrets.SFTP_PASS }}" scp -o StrictHostKeyChecking=no -r $(pwd) ${{ secrets.SFTP_USER }}@ssh.potzplitz.de:/var/www/html/scoresniper_dev
|
||||||
mirror -R --delete ScoreSniper/dist /var/www/html/scoresniper
|
|
||||||
quit
|
|
||||||
EOF
|
|
Loading…
Reference in a new issue