You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/main.yml
+13-17Lines changed: 13 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ jobs:
52
52
# Be aware, in this example this job updates the server on pull request, so either move it to another worflow, either remove pull request trigger above
53
53
deploy:
54
54
runs-on: ubuntu-latest
55
-
needs: [test]
55
+
needs: [test]# do not update if tests fail
56
56
steps:
57
57
- uses: actions/checkout@v2
58
58
- uses: actions/setup-node@v2-beta
@@ -76,19 +76,15 @@ jobs:
76
76
name: dist
77
77
path: |
78
78
dist
79
-
- name: copy static files to destination server
80
-
uses: garygrossgarten/github-action-scp@release
81
-
with:
82
-
local: dist
83
-
remote: /srv/http/vue/dist
84
-
# In order for credentials to work you need to put them into github settings https://github.com/USERNAME/REPOSITORY/settings/actions
85
-
# Check credentials description in https://github.com/garygrossgarten/github-action-scp
86
-
# I prefer using new pair of ssh keys, instead of exposing password to github
# Copying files by packing them into non-compress archive is a lot faster. It takes 8 seconds to copy all files instead of 4 minutes with packages like garygrossgarten/github-action-scp@release
87
+
run: |
88
+
cd frontend
89
+
tar c dist/ | ssh ${{ secrets.SSH_USER }}@${{ secrets.HOST }} -p ${{ secrets.PORT }} "rm -rf /srv/http/vue/dist && tar x -C /srv/http/vue/"
0 commit comments