Nav bar works + auth allows only slavic media emails #288
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: Node.JS CI/CD | |
on: | |
push: | |
branches: [main] | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.JS ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: | | |
cd backend | |
npm install | |
- name: Build TypeScript | |
run: | | |
cd backend | |
npm run build | |
- name: Run tests | |
run: | | |
cd backend | |
npm test | |
env: | |
DBHOST: ${{ secrets.DBHOST }} | |
deploy: | |
name: Deploy | |
needs: [test] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.JS ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies and build | |
run: | | |
cd backend | |
npm install | |
npm run build | |
- name: Deploy to production | |
uses: johnbeynon/[email protected] | |
with: | |
service-id: ${{ secrets.SERVICE_ID }} | |
api-key: ${{ secrets.RENDER_API_KEY }} |