docs: added discord and npm badges #115
Workflow file for this run
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
name: CI/CD | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x, 19.x, 20.x, 21.x] | |
services: | |
db: | |
image: postgres:14.4-alpine | |
env: | |
POSTGRES_USER: user | |
POSTGRES_PASSWORD: password | |
POSTGRES_DB: typegraphql-prisma | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Setup project | |
run: | | |
npm install | |
- name: Check codebase | |
run: | | |
npm run check:format | |
npm run check:type | |
- name: Run tests | |
run: | | |
npm run test:ci | |
env: | |
CI: true | |
TEST_DATABASE_URL: postgresql://user:password@localhost:5432/typegraphql-prisma | |
deploy-website: | |
if: ${{ github.ref == 'refs/heads/main' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: "16" | |
- name: Build Docusaurus website | |
run: | | |
cd website | |
npm i | |
npm run build | |
- uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./website/build | |
user_name: "gh-actions" | |
user_email: "[email protected]" | |
commit_message: | | |
Deploy website | |
Deploy website version based on |