site/.github/workflows/gatsby.yml

22 lines
472 B
YAML

name: Publish a gatsby project with SCP
on:
push:
branches:
- master
workflow_dispatch:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build project
run: |
sudo npm install -g gatsby-cli
yarn
gatsby build
- name: Publish to server via scp
run: |
yarn run deploy ${{ secrets.WEBMASTER_USERNAME }} ${{ secrets.WEBMASTER_PASSWORD }}