24 lines
527 B
YAML
24 lines
527 B
YAML
name: Publish a gatsby project with SCP
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '18.13.0'
|
|
- name: Build project
|
|
run: |
|
|
sudo yarn global add gatsby-cli
|
|
yarn
|
|
gatsby build
|
|
- name: Publish to server via scp
|
|
run: |
|
|
yarn run deploy ${{ secrets.WEBMASTER_USERNAME }} ${{ secrets.WEBMASTER_PASSWORD }}
|