Skip to content

Commit

Permalink
Echo file .env develop.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MinhhTien authored Jan 23, 2024
1 parent f43d4be commit b31df6d
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@ jobs:
build:
runs-on: self-hosted
environment: develop
env:
NODE_ENV: ${{ vars.NODE_ENV }}
PORT: ${{ vars.PORT }}
MONGODB_CONNECTION_STRING: ${{ secrets.MONGODB_CONNECTION_STRING }}
JWT_ACCESS_SECRET: ${{ vars.JWT_ACCESS_SECRET }}
JWT_ACCESS_EXPIRATION: ${{ vars.JWT_ACCESS_EXPIRATION }}
JWT_REFRESH_SECRET: ${{ vars.JWT_REFRESH_SECRET }}
JWT_REFRESH_EXPIRATION: ${{ vars.JWT_REFRESH_EXPIRATION }}
strategy:
matrix:
node-version: [20.x]
Expand All @@ -33,5 +25,14 @@ jobs:
run: npm run build
- name: Check pm2 list
run: pm2 list
- name: 'Create env file'
run: |
echo "${{ vars.NODE_ENV }}" > .env
echo "${{ vars.PORT }}" > .env
echo "${{ secrets.MONGODB_CONNECTION_STRING }}" > .env
echo "${{ vars.JWT_ACCESS_SECRET }}" > .env
echo "${{ vars.JWT_ACCESS_EXPIRATION }}" > .env
echo "${{ vars.JWT_REFRESH_SECRET }}" > .env
echo "${{ vars.JWT_REFRESH_EXPIRATION }}" > .env
- name: Deploy
run: pm2 restart efurniture-api

0 comments on commit b31df6d

Please sign in to comment.