ci: run deploy on self-hosted runner

This commit is contained in:
Nicola Zambello 2022-02-21 15:47:44 +01:00
parent 882d1fc5a5
commit 3eab4984eb

View file

@ -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 }}