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:
|
2020-08-24 08:50:39 +03:00
|
|
|
- uses: actions/checkout@v2
|
2020-03-21 20:41:52 +03:00
|
|
|
|
2020-06-26 09:34:30 +03:00
|
|
|
- name: Build Gatsby Site
|
2020-06-26 10:05:48 +03:00
|
|
|
uses: jzweifel/gatsby-cli-github-action@master
|
2020-06-26 09:34:30 +03:00
|
|
|
with:
|
|
|
|
gatsby-arg: build
|
2020-03-21 20:41:52 +03:00
|
|
|
|
2020-06-26 09:34:30 +03:00
|
|
|
- name: Deply via ssh
|
2020-08-24 08:50:39 +03:00
|
|
|
uses: appleboy/scp-action@v0.1.1
|
2020-03-21 20:41:52 +03:00
|
|
|
with:
|
|
|
|
host: ${{ secrets.HOST }}
|
2020-06-25 17:42:01 +03:00
|
|
|
username: ${{ secrets.WEBMASTER_USERNAME }}
|
2020-06-25 22:54:04 +03:00
|
|
|
password: ${{ secrets.WEBMASTER_PASSWORD }}
|
2020-03-21 20:41:52 +03:00
|
|
|
source: "public/*"
|
2020-06-26 09:48:58 +03:00
|
|
|
target: "html/"
|