feat(*): update worklogs list view and overtime checking #12
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
name: Production Deploy | |
on: | |
push: | |
branches: | |
- main | |
permissions: write-all | |
jobs: | |
# action instruction https://dev.to/kenessajr/deploy-a-react-app-to-digitalocean-using-github-actions-and-docker-4pln | |
api: | |
runs-on: ubuntu-latest | |
env: | |
CI: true | |
steps: | |
- name: ⬇️ Checkout repo | |
uses: actions/checkout@v2 | |
- name: ⎔ Setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 20 | |
- name: 📥 Install dependencies | |
run: | | |
npm install --legacy-peer-deps | |
- name: Create env | |
run: | | |
echo '${{ secrets.PRIVATE_ENV }}' >> .env | |
- name: 🚀 Build project | |
run: npm run build:prod | |
- name: 🚀 Publish Api to Github Packages Registry | |
uses: elgohr/Publish-Docker-Github-Action@master | |
with: | |
name: fedorrychkov/nestjs-tg-jira-bot/tg-bot-prod | |
registry: docker.pkg.github.com | |
username: ${{ vars.GH_USERNAME }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
dockerfile: Dockerfile-prod.api | |
tags: latest | |
- name: 🚀 Pull packages in DigitalOcean server | |
uses: appleboy/ssh-action@master | |
env: | |
GH_USERNAME: ${{ vars.GH_USERNAME }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
host: ${{ secrets.PROD_API_HOST }} | |
username: ${{ secrets.PROD_API_USERNAME }} | |
password: ${{ secrets.PROD_API_PASSWORD }} | |
port: 22 | |
envs: GH_USERNAME, GITHUB_TOKEN | |
script: | | |
docker stop nestjs-container | |
docker system prune -a -f | |
docker network create mynetwork | |
docker login docker.pkg.github.com -u $GH_USERNAME -p $GITHUB_TOKEN | |
docker pull docker.pkg.github.com/fedorrychkov/nestjs-tg-jira-bot/tg-bot-prod:latest | |
docker run --restart=on-failure -dit --name nestjs-container -p 80:8080 --network mynetwork docker.pkg.github.com/fedorrychkov/nestjs-tg-jira-bot/tg-bot-prod:latest | |