Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Commit

Permalink
feat: gh action deploy (#803)
Browse files Browse the repository at this point in the history
* feat: gh action deploy

* feat: caprover captain file

* fix: gh deploy action

* fix: docker image path

* fix: deploy only on new package
  • Loading branch information
eddiejaoude authored Jun 11, 2024
1 parent 33cb728 commit d8534f0
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/deploy
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build & Deploy

on:
registry_package:
types: [published]

jobs:
build-and-deploy:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm ci
- run: npm run build --if-present
- run: npm run test --if-present

- uses: a7ul/[email protected]
with:
command: c
cwd: "./"
files: |
backend/
frontend/dist/
captain-definition
outPath: deploy.tar

- name: Deploy App to CapRover
uses: caprover/[email protected]
with:
server: '${{ secrets.CAPROVER_SERVER }}'
app: eddie-bot
token: '${{ secrets.CAPROVER_TOKEN }}'
4 changes: 4 additions & 0 deletions captain-definition
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"schemaVersion": 2,
"imageName": "ghcr.io/eddiehubcommunity/eddiebot:latest"
}

0 comments on commit d8534f0

Please sign in to comment.