Create gatsby.yml
This commit is contained in:
parent
d5d98f1057
commit
e0df1dfe57
34
.github/workflows/gatsby.yml
vendored
Normal file
34
.github/workflows/gatsby.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
name: Publish a gatsby project with SCP
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
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
|
||||
uses: appleboy/scp-action@master
|
||||
with:
|
||||
host: ${{ secrets.HOST }}
|
||||
port: ${{ secrets.PORT }}
|
||||
username: ${{ secrets.USERNAME }}
|
||||
key: ${{ secrets.KEY }}
|
||||
passphrase: ${{ secrets.PASSPHRASE }}
|
||||
source: "public/*"
|
||||
target: "/home/webmaster/html"
|
||||
overwrite: 1
|
||||
strip_components: 1
|
Loading…
Reference in New Issue
Block a user