[feat] Added properly CI/CD
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
name: Deployment
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Django CI/CD", "Frontend CI/CD"]
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: self-hosted
|
||||
if: github.event.workflow_run.conclusion == 'success'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: docker.io
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
||||
- name: Pull Docker images and start containers
|
||||
run: docker-compose up -d
|
||||
Reference in New Issue
Block a user