File tree Expand file tree Collapse file tree 3 files changed +44
-7
lines changed
Expand file tree Collapse file tree 3 files changed +44
-7
lines changed Original file line number Diff line number Diff line change 1+ name : " Build (Pull Request)"
2+
3+ on :
4+ pull_request :
5+ types : [opened, synchronize, reopened]
6+ branches :
7+ - main
8+ - dev
9+
10+ jobs :
11+ build :
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v3
17+
18+ - name : Setup Node.js
19+ uses : actions/setup-node@v3
20+ with :
21+ node-version : ' 23'
22+
23+ - name : Install root dependencies
24+ run : npm install
25+
26+ - name : Install client dependencies
27+ run : |
28+ cd client
29+ npm install
30+
31+ - name : Run build
32+ run : npm run build
Original file line number Diff line number Diff line change 2424 run : |
2525 ssh ${{ secrets.SERVER_USER }}@${{ secrets.STAGING_IP }} << 'EOF'
2626 cd /home/modl/modl-admin
27- git pull origin main
27+ git pull origin dev
2828 npm install
2929 cd client
3030 npm install
Original file line number Diff line number Diff line change @@ -14,14 +14,19 @@ class EmailService {
1414 private transporter : nodemailer . Transporter ;
1515
1616 constructor ( ) {
17+ const smtpPort = Number ( process . env . SMTP_PORT ) || 25 ;
18+ const emailAuth = {
19+ user : process . env . SMTP_USERNAME ,
20+ pass : process . env . SMTP_PASSWORD
21+ } ;
1722 this . transporter = nodemailer . createTransport ( {
18- host : process . env . SMTP_HOST || 'localhost' ,
19- port : parseInt ( process . env . SMTP_PORT || '25' ) ,
20- secure : false , // Use TLS
21- auth : undefined , // No auth for local postfix
23+ host : process . env . SMTP_HOST || "localhost" , // Assuming postfix is running on localhost
24+ port : smtpPort ,
25+ secure : false , // true for 465, false for other ports
2226 tls : {
23- rejectUnauthorized : false
24- }
27+ rejectUnauthorized : false // Allow self-signed certificates
28+ } ,
29+ auth : ( emailAuth . user && emailAuth . pass ) ? emailAuth : undefined
2530 } ) ;
2631 }
2732
You can’t perform that action at this time.
0 commit comments