26 lines
517 B
YAML
26 lines
517 B
YAML
name: 🚀 Deploy
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request: {}
|
|
|
|
jobs:
|
|
deploy:
|
|
name: 🚀 Deploy
|
|
runs-on: self-hosted
|
|
# only build/deploy main branch on pushes
|
|
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
|
|
|
|
steps:
|
|
- name: ⬇️ Checkout repo
|
|
uses: actions/checkout@v2
|
|
with:
|
|
path: ../../explit
|
|
|
|
- name: ⚒ Build
|
|
run: yarn build
|
|
|
|
- name: 🚀 Deploy
|
|
run: pm2 startOrRestart ecosystem.config.js
|