Skip to content

Merge pull request #241 from AltCamp/docs/update-swagger-posts-api #7

Merge pull request #241 from AltCamp/docs/update-swagger-posts-api

Merge pull request #241 from AltCamp/docs/update-swagger-posts-api #7

Workflow file for this run

name: Deployment pipeline
on:
push:
branches: [main]
jobs:
pre_build_run:
runs-on: ubuntu-20.04
environment:
name: Pre-deployment
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install dependencies
run: npm install
- name: Check code style
run: npm run format:check
- name: Lint code base
run: npm run lint
- name: Run tests
env:
TEST_CLOUDINARY_CLOUD_NAME: ${{ secrets.TEST_CLOUDINARY_CLOUD_NAME }}
TEST_CLOUDINARY_API_KEY: ${{ secrets.TEST_CLOUDINARY_API_KEY }}
TEST_CLOUDINARY_API_SECRET: ${{ secrets.TEST_CLOUDINARY_API_SECRET }}
JWT_SECRET: ${{ secrets.JWT_SECRET }}
JWT_EXPIRY: ${{ secrets.JWT_EXPIRY }}
run: npm run test
build:
needs: pre_build_run
runs-on: self-hosted
environment:
name: Pre-deployment
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Decrypt files
run: |
gpg --decrypt --quiet --batch --passphrase="$PASSPHRASE" --pinentry-mode loopback --output .env .locke.gpg
env:
PASSPHRASE: ${{ secrets.PASSPHRASE }}
- name: Install dependencies
run: npm install --omit=dev