28 lines
671 B
YAML
28 lines
671 B
YAML
name: build and deploy to prod!
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
jobs:
|
|
build:
|
|
name: Build Website
|
|
runs-on: self-hosted
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
- run: |
|
|
npm install
|
|
npm run build
|
|
- name: Rsync to server
|
|
uses: burnett01/rsync-deployments@5.2
|
|
with:
|
|
switches: -avzr --delete
|
|
path: dist
|
|
remote_path: /home/ansible/polsevev.dev
|
|
remote_host: ${{secrets.SERVER_IP}}
|
|
remote_user: ansible
|
|
remote_key: ${{secrets.SSH_PRIVATE_KEY}}
|
|
remote_port: 22
|