ci: run deploy on self-hosted runner
This commit is contained in:
parent
882d1fc5a5
commit
3eab4984eb
13
.github/workflows/main.yml
vendored
13
.github/workflows/main.yml
vendored
|
|
@ -8,17 +8,18 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
name: 🚀 Deploy
|
name: 🚀 Deploy
|
||||||
runs-on: ubuntu-latest
|
runs-on: self-hosted
|
||||||
# only build/deploy main branch on pushes
|
# only build/deploy main branch on pushes
|
||||||
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
|
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: ⬇️ Checkout repo
|
- name: ⬇️ Checkout repo
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
path: ../../explit
|
||||||
|
|
||||||
|
- name: ⚒ Build
|
||||||
|
run: yarn build
|
||||||
|
|
||||||
- name: 🚀 Deploy
|
- name: 🚀 Deploy
|
||||||
uses: superfly/flyctl-actions@1.1
|
run: pm2 startOrRestart ecosystem.config.js
|
||||||
with:
|
|
||||||
args: "deploy --remote-only"
|
|
||||||
env:
|
|
||||||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue