erick.is/.github/workflows/build-deploy-prod.yml

28 lines
650 B
YAML
Raw Normal View History

name: Build and Deploy Production Site
2021-01-05 15:40:33 -05:00
on:
push:
branches:
- main
2021-01-05 15:40:33 -05:00
jobs:
build:
runs-on: ubuntu-latest
steps:
2021-01-05 16:28:37 -05:00
- uses: actions/checkout@v2
- name: setup node
uses: actions/setup-node@v1
with:
node-version: 14.x
- run: npm ci
- run: npm run build --if-present
- name: deploy site
uses: appleboy/scp-action@v0.1.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
source: "_site"
2021-08-19 10:28:49 -04:00
target: "/home/${{ secrets.USERNAME }}/erch.co"
2021-01-05 16:28:37 -05:00
strip_components: 1