Secured the adminpage and createnewblog page to be accessed by admins… #8
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: My Brand Node.js CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "18.x" | |
- name: Install dependencies | |
run: npm install | |
- name: Run Jest tests | |
run: | | |
PORT=0 npm test | |
env: | |
ADMIN_EMAIL: ${{ secrets.ADMIN_EMAIL }} | |
ADMIN_PASSWORD: ${{ secrets.ADMIN_PASSWORD }} | |
JWT_SECRET: ${{ secrets.JWT_SECRET }} | |
MONGO_URI: ${{ secrets.MONGO_URI }} | |
PORT: ${{ secrets.PORT }} |