Add GH Action deployment.
This commit is contained in:
parent
60f978f790
commit
d740403f27
|
|
@ -0,0 +1,25 @@
|
||||||
|
name: Deploy
|
||||||
|
on:
|
||||||
|
# triggers the workflow only for the master branch
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
# checks-out repository under $GITHUB_WORKSPACE
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: SCP Files
|
||||||
|
uses: appleboy/scp-action@master
|
||||||
|
with:
|
||||||
|
host: ${{ secrets.DROPLET_IP }}
|
||||||
|
username: ${{ secrets.DROPLET_USER }}
|
||||||
|
key: ${{ secrets.DROPLET_KEY }}
|
||||||
|
source: "dist/*"
|
||||||
|
target: ${{ secrets.DEPLOY_PATH }}
|
||||||
|
strip_components: 1
|
||||||
|
rm: true
|
||||||
Reference in New Issue