30 lines
681 B
YAML
30 lines
681 B
YAML
name: deploy
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
name: build and deploy
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
|
|
- name: install dependencies
|
|
run: npm install
|
|
|
|
- name: build
|
|
run: node_modules/gatsby/dist/bin/gatsby.js build
|
|
|
|
- name: copy file via ssh password
|
|
uses: appleboy/scp-action@master
|
|
with:
|
|
host: ${{ secrets.HOST }}
|
|
username: ${{ secrets.WEBMASTER_USERNAME }}
|
|
key: ${{ secrets.NPM_GITHUB_PRIVATE_KEY }}
|
|
password: ${{ secrets.WEBMASTER_PASSWORD }}
|
|
source: "public/*"
|
|
target: "/home/webmaster/html/"
|
|
overwrite: true
|