Skip to content

Update .release-please-manifest.json #2

Update .release-please-manifest.json

Update .release-please-manifest.json #2

Workflow file for this run

name: Deploy main branch
on:
push:
branches:
- main
env:
CI: true
SSH_PORT: 22
permissions:
contents: write
pull-requests: write
jobs:
send-noti-on-start:
runs-on: ubuntu-latest
name: Send noti to telegram on
steps:
- name: Send Telegram Message
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_RECEIVER }}
token: ${{ secrets.TELEGRAM_TOKEN }}
format: html
message: |
πŸš€
Start deploy <b>Nested Notation</b> to production
Commit message ✨: ${{ github.event.head_commit.message}}
Commited by πŸš€: <b>${{ github.event.head_commit.author.name}}</b>
See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}}
πŸš€
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.RELEASE_TOKEN }}
deploy:
runs-on: ubuntu-latest
needs: send-noti-on-start
continue-on-error: true
steps:
- name: Pull code and restart pm2
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST_PRO }}
username: ${{ secrets.SSH_USERNAME_PROD }}
port: 22
password: ${{ secrets.SSH_PASSWORD_PRO }}
script: |
whoami
pwd
cd nestednotation
git reset --hard
git pull origin main
npm install
pm2 start ecosystem.config.js -f --env production
send-noti-on-complete:
runs-on: ubuntu-latest
needs: deploy
steps:
- name: Send Telegram Message
# if: success()
if: ${{ needs.deploy.result == 'success' }}
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_RECEIVER }}
token: ${{ secrets.TELEGRAM_TOKEN }}
format: html
message: |
βœ…
Deploy <b>Nested Notation</b> to production successfully
See changes: ${{ github.event.head_commit.message}}
Deployed by: <b>${{ github.event.head_commit.author.name}}</b>
βœ…
- name: Send Telegram Message
if: ${{ needs.deploy.result == 'failure' }}
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_RECEIVER }}
token: ${{ secrets.TELEGRAM_TOKEN }}
format: html
message: |
❌
Deploy Nested Notation to Prod failed
Deployed by: <b>${{ github.event.head_commit.author.name}}</b>
See changes: ${{ github.event.head_commit.message}}
Error Details: ${{ github.action_status.message }}
❌