-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: RealTimeChat-Project CI | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
working-directory: ./RealTimeChatAPI | ||
|
||
- name: Run linting | ||
run: npm run lint | ||
working-directory: ./RealTimeChatAPI | ||
|
||
- name: Run tests | ||
run: npm test | ||
working-directory: ./RealTimeChatAPI | ||
|
||
# - name: Build the Docker image for Directus | ||
# run: docker build . --file Directus/Dockerfile --tag directus:$(date +%s) | ||
|
||
# - name: Build the Docker image for chatApiBackend | ||
# run: docker build . --file chatApiBackend/Dockerfile --tag chat-api:$(date +%s) | ||
|
||
- name: Run docker-compose | ||
run: docker-compose -f docker-compose.yaml up --build | ||
|
||
# deploy: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - uses: astappiev/docker-compose-remote-action@master | ||
# name: Docker-Compose Remote Deployment | ||
# with: | ||
# ssh_host: example.com | ||
# ssh_user: ${{ secrets.DEPLOY_USERNAME }} | ||
# ssh_private_key: ${{ secrets.DEPLOY_PRIVATE_KEY }} | ||
# ssh_host_public_key: ${{ secrets.DEPLOY_PUBLIC_KEY }} | ||
# docker_compose_prefix: myapp |