site/.github/workflows/main.yml

33 lines
695 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:
gatsby-arg: 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
2020-08-24 14:46:46 +03:00
uses: appleboy/scp-action@v0.1.1
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 }}
source: "public/*"
2020-06-26 09:48:58 +03:00
target: "html/"