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 14:46:46 +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-08-24 14:46:46 +03:00
|
|
|
uses: jzweifel/gatsby-cli-github-action@v1.0.0
|
2020-06-26 09:34:30 +03:00
|
|
|
with:
|
2021-01-19 12:34:22 +03:00
|
|
|
args: build
|
2020-08-24 09:39:42 +03:00
|
|
|
|
|
|
|
- name: Upload bundle
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: "site-bundle"
|
|
|
|
path: "public/"
|
2020-03-21 20:41:52 +03:00
|
|
|
|
2020-06-26 09:34:30 +03:00
|
|
|
- name: Deply via ssh
|
2021-01-19 12:20:46 +03:00
|
|
|
uses: appleboy/scp-action@master
|
2020-03-21 20:41:52 +03:00
|
|
|
with:
|
|
|
|
host: ${{ secrets.HOST }}
|
2020-06-25 17:42:01 +03:00
|
|
|
username: ${{ secrets.WEBMASTER_USERNAME }}
|
2021-01-19 12:20:46 +03:00
|
|
|
key: ${{secrets.NPM_GITHUB_PRIVATE_KEY}}
|
2020-03-21 20:41:52 +03:00
|
|
|
source: "public/*"
|
2020-06-26 09:48:58 +03:00
|
|
|
target: "html/"
|