-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(github actions): 添加 github actions,已完成自动部署
- Loading branch information
白唯
committed
Oct 13, 2020
1 parent
05ebfb5
commit 167b2a3
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: deploy | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '10.x' | ||
- name: Install npm dependencies | ||
run: npm install | ||
- name: Run build task | ||
run: npm run build --if-present | ||
- name: Deploy to Server | ||
uses: easingthemes/ssh-deploy@v2.1.5 | ||
env: | ||
SSH_PRIVATE_KEY: ${{ secrets.SERVER_SSH_KEY }} | ||
ARGS: "-rltgoDzvO --delete" | ||
SOURCE: "dist/" | ||
REMOTE_HOST: ${{ secrets.REMOTE_HOST }} | ||
REMOTE_USER: ${{ secrets.REMOTE_USER }} | ||
TARGET: ${{ secrets.REMOTE_TARGET }} |