site/.github/workflows/gatsby.yml

32 lines
759 B
YAML
Raw Normal View History

2021-03-28 22:38:22 +03:00
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
2021-10-31 12:20:47 +03:00
uses: appleboy/scp-action@master
2021-03-28 22:38:22 +03:00
with:
host: ${{ secrets.HOST }}
port: ${{ secrets.PORT }}
2021-03-28 22:40:19 +03:00
username: ${{ secrets.WEBMASTER_USERNAME }}
2021-03-29 13:09:54 +03:00
password: ${{ secrets.WEBMASTER_PASSWORD }}
2021-03-29 13:59:38 +03:00
# key: ${{ secrets.NPM_GITHUB_PRIVATE_KEY }}
2021-03-28 22:38:22 +03:00
source: "public/*"
target: "/home/webmaster/html"
overwrite: 1
strip_components: 1