Remove dockerfile and workflow, deploy is with Coolify

This commit is contained in:
Lewis Dale 2024-10-18 20:27:54 +01:00
parent d30f404b4e
commit 158efda026
3 changed files with 0 additions and 161 deletions

View File

@ -1,71 +0,0 @@
name: Build and copy to prod
on:
push:
schedule:
- cron: '0 * * * *'
jobs:
build-and-copy:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to gitea container registry
uses: docker/login-action@v3
with:
registry: git.lewisdale.dev
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Install dependencies 📦
run: npm ci
- name: Cache build
id: cache-eleventy-build
uses: actions/cache@v4
with:
path: .cache
key: cache-eleventy-build-${{ gitea.run_id }}
restore-keys: |
cache-eleventy-build
- name: Cache _site
id: cache-site
uses: actions/cache@v4
with:
path: _site
key: cache-site-${{ gitea.run_id }}
restore-keys: |
cache-site
- name: Build eleventy
run: npm run build
env:
NODE_ENV: production
OMNIVORE_API_KEY: ${{ secrets.OMNIVORE_API_KEY }}
UMAMI_API_KEY: ${{ secrets.UMAMI_API_KEY }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: git.lewisdale.dev/lewis/blog:latest
- name: Purge XML files from cache
run: |
curl --request POST \
--url 'https://api.bunny.net/purge?url=https%3A%2F%2Flewisdale.dev%2F%2A.xml&async=false' \
--header 'AccessKey: ${{ secrets.BUNNY_ACCESS_KEY }}'
- name: Purge JSON files from cache
run: |
curl --request POST \
--url 'https://api.bunny.net/purge?url=https%3A%2F%2Flewisdale.dev%2F%2A.json&async=false' \
--header 'AccessKey: ${{ secrets.BUNNY_ACCESS_KEY }}'
- name: Purge CSS files from cache
run: |
curl --request POST \
--url 'https://api.bunny.net/purge?url=https%3A%2F%2Flewisdale.dev%2F%2A.css&async=false' \
--header 'AccessKey: ${{ secrets.BUNNY_ACCESS_KEY }}'

View File

@ -1,4 +0,0 @@
FROM nginx:alpine
COPY _site /var/www/html
COPY nginx.conf /etc/nginx/conf.d/default.conf

View File

@ -1,86 +0,0 @@
server {
listen 80;
listen [::]:80;
listen 443;
listen [::]:443;
server_name localhost blog.srvc.lol;
#access_log /var/log/nginx/host.access.log main;
root /var/www/html;
location / {
try_files $uri $uri/ =404;
index index.html;
}
location ~ /blog/feed.xml {
return 301 https://lewisdale.dev/feed/;
}
location ~ \.(xml|json) {
expires 1h;
add_header Cache-Control "public, no-transform";
}
location ~ ^/feed/atom/* {
try_files /atom.xml =404;
}
location ~ ^/feed/json/* {
try_files /feed.json =404;
}
location ~ ^/feed/?$ {
try_files /rss.xml =404;
}
location ~ ^/post/tag/[0-9a-z\-]+/feed/?$ {
rewrite /post/tag/([0-9a-z\-]+)/feed/?$ /post/tag/$1/rss.xml last;
}
location ~ ^/post/tag/[0-9a-z\-]+/feed/atom {
rewrite /post/tag/([0-9a-z\-]+)/feed/atom /post/tag/$1/atom.xml last;
}
location ~ ^/post/tag/[0-9a-z\-]+/feed/json {
rewrite /post/tag/([0-9a-z\-]+)/feed/json /post/tag/$1/feed.json last;
}
location ~\.(ini|log|conf|md|env)$ {
deny all;
error_page 403 =404 / ;
}
error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}