site/.github/workflows/main.yml

33 lines
686 B
YAML
Raw Normal View History

2020-06-25 11:49:12 +03:00
name: deploy
on:
push:
branches:
2020-06-25 11:49:12 +03:00
- master
jobs:
build:
2020-06-25 11:49:12 +03:00
name: build and deploy
runs-on: ubuntu-latest
steps:
2020-08-24 14:46:46 +03:00
- uses: actions/checkout@v2
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-06-26 09:34:30 +03:00
- name: Deply via ssh
2021-01-19 12:20:46 +03:00
uses: appleboy/scp-action@master
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}}
source: "public/*"
2020-06-26 09:48:58 +03:00
target: "html/"