Skip to content

Commit

Permalink
ci(github actions): 添加 github actions,已完成自动部署
Browse files Browse the repository at this point in the history
  • Loading branch information
白唯 committed Oct 13, 2020
1 parent 05ebfb5 commit 167b2a3
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflow/deploy.yml
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 }}

0 comments on commit 167b2a3

Please sign in to comment.