Skip to content

Commit

Permalink
feat: generate .env
Browse files Browse the repository at this point in the history
  • Loading branch information
MathisSenicourt committed May 14, 2024
1 parent 29d2615 commit bf2f663
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,3 @@ SSH_HOST=chasseauxportails-hvm.bcd.tech
SSH_USER=root
APP_PATH=/opt/ycap-back
APP_FILES=./controllers ./models ./routes ./service ./package-lock.json ./package.json ./server.js
PRIVATE_ACCES_KEY= 'yourAccesPrivateKey'
PRIVATE_REFRESH_KEY= 'yourRefreshPrivateKey'
4 changes: 3 additions & 1 deletion .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ jobs:
- name: Deploy to dev
run: make push
env:
ENV: dev
ENV: dev
ACCESS_TOKEN_KEY: ${{ secrets.ACCESS_TOKEN_KEY }}
REFRESH_TOKEN_KEY: ${{ secrets.REFRESH_TOKEN_KEY }}
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ endif
push:
ssh -o StrictHostKeyChecking=no -p $(SSH_PORT) $(SSH_USER)@$(SSH_HOST) "rm -rf $(APP_PATH) && mkdir -p $(APP_PATH)"
scp -o StrictHostKeyChecking=no -P $(SSH_PORT) -r $(APP_FILES) $(SSH_USER)@$(SSH_HOST):$(APP_PATH)
ssh -o StrictHostKeyChecking=no -p $(SSH_PORT) $(SSH_USER)@$(SSH_HOST) "cd $(APP_PATH) && npm i"
echo ACCESS_TOKEN_KEY=$(ACCESS_TOKEN_KEY) >> $(APP_PATH)/.env
echo REFRESH_TOKEN_KEY=$(REFRESH_TOKEN_KEY) >> $(APP_PATH)/.env
ssh -o StrictHostKeyChecking=no -p $(SSH_PORT) $(SSH_USER)@$(SSH_HOST) "cd $(APP_PATH) && npm i && systemctl restart ycap-back"

0 comments on commit bf2f663

Please sign in to comment.