Skip to content

Commit

Permalink
fix: containers not running in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
StiliyanKushev committed Feb 6, 2024
1 parent 386dbf2 commit dc4ca70
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/api-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ jobs:
- name: Prepare .env
run: cp .env.e2e .env

- name: Prepare containers
run: sudo npm run docker:prepare

- name: Generate the docs markdown
run: npm run docs

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"private": true,
"license": "UNLICENSED",
"scripts": {
"docker:prepare": "docker-compose up -d db redis",
"build": "nest build",
"docs": "nest start --entryFile openapi.js",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
Expand Down Expand Up @@ -101,4 +102,4 @@
"coverageDirectory": "../coverage",
"testEnvironment": "node"
}
}
}
2 changes: 1 addition & 1 deletion src/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import converter from 'widdershins';
import { AppModule } from './app.module';

async function bootstrap() {
const app = await NestFactory.create(AppModule);
const app = await NestFactory.create(AppModule, { logger: false });
const document = app.get(SwaggerSetupService).setup(app);
const docs = await converter.convert(document, {});
fs.writeFileSync('./API_DOCUMENTATION.md', docs);
Expand Down

0 comments on commit dc4ca70

Please sign in to comment.