2020-06-25 11:49:12 +03:00
|
|
|
name: deploy
|
2020-03-21 20:41:52 +03:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2020-06-25 11:49:12 +03:00
|
|
|
- master
|
2020-03-21 20:41:52 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2020-06-25 11:49:12 +03:00
|
|
|
name: build and deploy
|
2020-03-21 20:41:52 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@master
|
|
|
|
|
|
|
|
- name: install dependencies
|
|
|
|
run: npm install
|
|
|
|
|
|
|
|
- name: build
|
|
|
|
run: node_modules/gatsby/dist/bin/gatsby.js build
|
|
|
|
|
|
|
|
- name: copy file via ssh password
|
|
|
|
uses: appleboy/scp-action@master
|
|
|
|
with:
|
|
|
|
host: ${{ secrets.HOST }}
|
2020-06-25 17:37:05 +03:00
|
|
|
key: ${{ secrets.NPM_GITHUB_PRIVATE_KEY }}
|
2020-03-21 20:41:52 +03:00
|
|
|
source: "public/*"
|
2020-03-22 13:05:35 +03:00
|
|
|
target: "/home/webmaster/html/"
|
2020-06-25 11:49:12 +03:00
|
|
|
overwrite: true
|