Skip to content

Commit 6ce055c

Browse files
committed
test-deploy 27
1 parent 957f36e commit 6ce055c

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

.github/workflows/test-deployment.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ jobs:
3838
name: production-build
3939
- name: Upload prod build to server
4040
working-directory: ./scripts
41-
run: |
42-
pwd
43-
ls
44-
echo "$SERVER_NAME"
45-
./copy2site.sh
41+
uses: appleboy/[email protected]
42+
with:
43+
host: ${{ vars.SERVER_NAME }}
44+
username: root
45+
key: ${{ secrets.SERVER_SSH_KEY }}
46+
port: 22
47+
script_path: copy2site.sh

scripts/copy2site.sh

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/bin/sh
22

3-
echo "Server name: $SERVER_NAME"
4-
ssh root@${SERVER_NAME} rm -r /var/www/webface_test
5-
ssh root@${SERVER_NAME} mkdir -p /var/www/webface_test
3+
rm -r /var/www/webface_test
4+
mkdir -p /var/www/webface_test

0 commit comments

Comments
 (0)