Skip to content

CD

CD #8

Workflow file for this run

name: CD
on:
workflow_run:
workflows: ["CI"]
branches: ["main"]
types:
- completed
jobs:
deploy:
name: deploy
runs-on: self-hosted
if: ${{
github.event.workflow_run.conclusion == 'success'
&& github.event.workflow_run.event == 'push'
}}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Create .env file
run: |
echo "NOCODB_API_TOKEN=${{ secrets.NOCODB_API_TOKEN }}" >> .env
echo "NOCODB_API_URL=${{ secrets.NOCODB_API_URL }}" >> .env
- name: Deploy docker-compose stack
run: docker compose up -d --build --force-recreate
- name: Prune Docker system
run: docker system prune -af