Skip to content

Commit 9232762

Browse files
committed
chore: deploy to coolify
1 parent d8a21b0 commit 9232762

File tree

5 files changed

+93
-0
lines changed

5 files changed

+93
-0
lines changed

.github/workflows/docs.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Docs
2+
on:
3+
push:
4+
branches: [main]
5+
6+
jobs:
7+
deploy:
8+
runs-on: ubuntu-latest
9+
environment: Production
10+
if: github.event_name == 'push' && github.repository_owner == 'vuetifyjs' && github.ref == 'refs/heads/main'
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: pnpm/action-setup@v4
14+
- uses: actions/setup-node@v4
15+
with:
16+
cache: 'pnpm'
17+
node-version-file: '.nvmrc'
18+
- run: pnpm i --frozen-lockfile
19+
- run: pnpm run docs:build
20+
- uses: docker/login-action@v3
21+
with:
22+
registry: ghcr.io
23+
username: ${{ github.actor }}
24+
password: ${{ secrets.GITHUB_TOKEN }}
25+
- id: meta
26+
uses: docker/metadata-action@v5
27+
with:
28+
images: ghcr.io/vuetifyjs/nuxt-module
29+
- uses: docker/build-push-action@v6
30+
with:
31+
context: .
32+
file: Dockerfile
33+
platforms: linux/amd64
34+
push: true
35+
tags: ${{ steps.meta.outputs.tags }}
36+
labels: ${{ steps.meta.outputs.labels }}
37+
- name: Deploy to Coolify
38+
run: |
39+
curl --request GET '${{ secrets.COOLIFY_WEBHOOK }}' --header 'Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}'

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22.10.0

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM nginx:alpine
2+
EXPOSE 80
3+
COPY ./docs/.vitepress/dist /usr/share/nginx/html
4+
COPY ./nginx.conf /etc/nginx/nginx.conf

docker-compose.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
services:
2+
docs:
3+
image: nginx:alpine
4+
ports:
5+
- ${PORT:-5173}:80
6+
volumes:
7+
- ./docs/.vitepress/dist:/usr/share/nginx/html
8+
- ./nginx.conf:/etc/nginx/nginx.conf

nginx.conf

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
worker_processes 1;
2+
3+
events {
4+
worker_connections 1024;
5+
}
6+
7+
http {
8+
include mime.types;
9+
default_type application/octet-stream;
10+
root /usr/share/nginx/html;
11+
12+
sendfile on;
13+
tcp_nopush on;
14+
15+
keepalive_timeout 65;
16+
17+
server {
18+
listen 80;
19+
server_name localhost;
20+
21+
charset utf-8;
22+
23+
location / {
24+
index index.html;
25+
try_files $uri $uri.html $uri/ =404;
26+
add_header Cache-Control 'public, max-age=3600, s-maxage=60';
27+
}
28+
29+
location /assets/ {
30+
add_header Cache-Control 'public, immutable, max-age=31536000, stale-if-error=604800';
31+
}
32+
33+
location = /service-worker.js {
34+
add_header Cache-Control 'public, max-age=0, s-maxage=60, must-revalidate';
35+
}
36+
37+
error_page 404 /404.html;
38+
error_page 403 /404.html;
39+
#error_page 500 502 503 504 /50x.html;
40+
}
41+
}

0 commit comments

Comments
 (0)