From 5291376eb9b6360c3f0dfd2400f50b648fc8dd00 Mon Sep 17 00:00:00 2001 From: abdelouahed oumoussa Date: Thu, 2 Oct 2025 00:29:17 +0100 Subject: [PATCH] ci(docs): add coolify deployment workflow --- .github/workflows/docs-deploy.yml | 26 ++++++++++++++++++++++ apps/docs/Dockerfile | 4 ++++ apps/docs/nginx.conf | 36 +++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 .github/workflows/docs-deploy.yml create mode 100644 apps/docs/Dockerfile create mode 100644 apps/docs/nginx.conf diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml new file mode 100644 index 00000000..8edfcfc0 --- /dev/null +++ b/.github/workflows/docs-deploy.yml @@ -0,0 +1,26 @@ +name: Docs Deploy +on: + push: + branches: [master] + +jobs: + deploy: + runs-on: ubuntu-latest + environment: Production + permissions: + contents: read + packages: write + deployments: write + steps: + - uses: actions/checkout@v5 + - uses: vuetifyjs/setup-action@master + - run: pnpm run build:docs + env: + VITE_API_SERVER_URL: ${{ vars.API_SERVER_URL }} + - uses: vuetifyjs/coolify-action@master + with: + imageName: v0-docs + dockerfilePath: ./apps/docs/Dockerfile + token: ${{ secrets.GITHUB_TOKEN }} + coolifyWebhook: ${{ secrets.COOLIFY_WEBHOOK }} + coolifySecret: ${{ secrets.COOLIFY_TOKEN }} diff --git a/apps/docs/Dockerfile b/apps/docs/Dockerfile new file mode 100644 index 00000000..87cfcf68 --- /dev/null +++ b/apps/docs/Dockerfile @@ -0,0 +1,4 @@ +FROM nginx:alpine +EXPOSE 80 +COPY ./apps/docs/dist /usr/share/nginx/html +COPY ./apps/docs/nginx.conf /etc/nginx/nginx.conf diff --git a/apps/docs/nginx.conf b/apps/docs/nginx.conf new file mode 100644 index 00000000..fa3be74b --- /dev/null +++ b/apps/docs/nginx.conf @@ -0,0 +1,36 @@ +worker_processes 1; + +events { + worker_connections 1024; +} + +http { + include mime.types; + default_type application/octet-stream; + root /usr/share/nginx/html; + + sendfile on; + tcp_nopush on; + + keepalive_timeout 65; + + server { + listen 80; + server_name localhost; + + charset utf-8; + + location / { + index index.html; + try_files $uri $uri/index.html /index.html; + add_header Cache-Control 'public, max-age=3600, s-maxage=60'; + } + + location /assets/ { + add_header Cache-Control 'public, immutable, max-age=31536000, stale-if-error=604800'; + } + + #error_page 404 /404.html; + #error_page 500 502 503 504 /50x.html; + } +}