✨ NEW: added pg npm package #3
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
on: | |
push: | |
branches: | |
- main | |
name: 🚀 Deploy website on push | |
env: | |
DB_URL: ${{vars.DB_URL}} | |
PORT: ${{vars.DB_URL}} | |
JWT_SECRET: ${{vars.JWT_SECRET}} | |
REFRESH_TOKEN_SECRET: ${{vars.REFRESH_TOKEN_SECRET}} | |
JWT_EXPIRES_IN: ${{vars.JWT_EXPIRES_IN}} | |
REFRESH_TOKEN_EXPIRES_IN: ${{vars.REFRESH_TOKEN_EXPIRES_IN}} | |
NODEMAILER_HOST: '' | |
NODEMAILER_USER: '' | |
NODEMAILER_PASS: '' | |
jobs: | |
web-deploy: | |
name: 🎉 Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🚚 Get latest code | |
uses: actions/checkout@v3 | |
- name: 🖥 Use Node.js 21 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '21' | |
- name: 🔨 Build Project | |
run: npm install && npm run build | |
- name: start | |
run: npm start | |
# - name: 📂 Copy Build Files to the server | |
# uses: appleboy/[email protected] | |
# with: | |
# host: ${{ secrets.HOST }} | |
# username: ${{ secrets.USERNAME }} | |
# password: ${{ secrets.PASSWORD }} | |
# source: '.next' | |
# target: ~/adhikari-banshawali/ | |
# | |
# - name: ♻️ Restart the server | |
# uses: appleboy/ssh-action@master | |
# with: | |
# host: ${{ secrets.HOST }} | |
# username: ${{ secrets.USERNAME }} | |
# password: ${{ secrets.PASSWORD }} | |
# script: | | |
# cd ~/adhikari-banshawali && | |
# git pull && | |
# touch ~/adhikari-banshawali/tmp/restart.txt |