Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: action cd #5

Merged
merged 1 commit into from
Dec 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
- main
paths:
- 'apps/backend/**'
pull_request:
branches:
- main
paths:
- 'apps/backend/**'

permissions:
contents: read
Expand All @@ -19,12 +24,29 @@ jobs:
- name: Checkout 🛎️
uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false

- name: Use Node.js version from .nvmrc
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Create Env File
run: |
touch ./apps/backend/.env
echo COUCHDB_PASSWORD=${{secrets.COUCHDB_PASSWORD}} >> ./apps/backend/.env
echo COUCHDB_PASSWORD=${{secrets.COUCHDB_PASSWORD}} >> ./apps/backend/.env

- name: Build
run: pnpm build --filter backend
- name: Build and Deploy Docker
working-directory: ./apps/backend
run: |
Expand Down