site/.github/workflows/main.yml

33 lines
695 B
YAML

name: deploy
on:
push:
branches:
- master
jobs:
build:
name: build and deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build Gatsby Site
uses: jzweifel/gatsby-cli-github-action@v1.0.0
with:
gatsby-arg: build
- name: Upload bundle
uses: actions/upload-artifact@v2
with:
name: "site-bundle"
path: "public/"
- name: Deply via ssh
uses: appleboy/scp-action@v0.1.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.WEBMASTER_USERNAME }}
password: ${{ secrets.WEBMASTER_PASSWORD }}
source: "public/*"
target: "html/"