Skip to content

Commit

Permalink
Merge pull request #51 from antegral/main
Browse files Browse the repository at this point in the history
Add CI/CD
  • Loading branch information
PortalCube authored Mar 23, 2024
2 parents e603e77 + 943ca8e commit e65726a
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/Deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Deploy

on:
push:
branches: [ "main" ]

jobs:
Deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Tailscale
uses: tailscale/github-action@v2
with:
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
tags: tag:ci

- name: Removing old deployment
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script: |
cd ~/prod/2024_BEOTKKOTTHON/Frontend
podman-compose down 2>&1
- name: Getting source and build
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script: |
cd ~/prod/2024_BEOTKKOTTHON/Frontend
git pull
podman rmi 2024goormthon/frontend 2>&1
podman build -t 2024goormthon/frontend .
- name: Run deployment
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script: |
cd ~/prod/2024_BEOTKKOTTHON/Frontend
podman-compose up -d

0 comments on commit e65726a

Please sign in to comment.