Compare commits

..

No commits in common. "54ab64171cabd1d1925b6a98ff309f43ca475b2c" and "f8ae33faf93caa3954885440ca0349d71a571325" have entirely different histories.

7 changed files with 68 additions and 63 deletions

3
.dockerignore Normal file
View File

@ -0,0 +1,3 @@
.git
Dockerfile
.dockerignore

22
.drone.yml Normal file
View File

@ -0,0 +1,22 @@
kind: pipeline
type: docker
platform:
os: linux
steps:
- name: submodules
image: alpine/git
commands:
- git submodule update --init --recursive
- name: build image
image: plugins/docker
settings:
username:
from_secret: DOCKER_USERNAME
password:
from_secret: DOCKER_PASSWORD
repo: simon987/recipes.simon987.net
context: ./
dockerfile: ./Dockerfile
tags: latest

View File

@ -1,61 +0,0 @@
name: Deploy
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v0.92.0/hugo_extended_0.92.0_Linux-64bit.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
- name: Build with Hugo
env:
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
hugo \
--gc \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./public
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3

11
Dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM jojomi/hugo:0.85.0 as build
WORKDIR /site
COPY . .
RUN hugo --minify -b https://recipes.simon987.net
FROM nginx:1.20.1-alpine
COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=build /site/public/ /www/

View File

@ -25,4 +25,4 @@ params:
Content: Mobile-friendly aggregation of recipes I regularly make and enjoy. Content: Mobile-friendly aggregation of recipes I regularly make and enjoy.
socialIcons: socialIcons:
- name: github - name: github
url: "https://github.com/simon987/recipes" url: "https://github.com/simon987/recipes.simon987.net"

View File

@ -2,7 +2,7 @@
title: "Crispy Tofu Bits" title: "Crispy Tofu Bits"
date: 2024-02-03T12:46:21-05:00 date: 2024-02-03T12:46:21-05:00
draft: false draft: false
tags: ["dinner", "tofu", "rice"] tags: ["dinner"]
cover: cover:
image: "images/image.webp" image: "images/image.webp"
--- ---

30
nginx.conf Normal file
View File

@ -0,0 +1,30 @@
user nginx;
worker_processes auto;
error_log /dev/stderr warn;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /dev/stdout main;
sendfile on;
keepalive_timeout 5;
server {
listen 80 default_server;
location / {
root /www/;
}
}
}