Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
*.webp filter=lfs diff=lfs merge=lfs -text
|
||||||
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
||||||
*.jpg filter=lfs diff=lfs merge=lfs -text
|
*.jpg filter=lfs diff=lfs merge=lfs -text
|
||||||
*.png filter=lfs diff=lfs merge=lfs -text
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
45
.gitea/workflows/main.yaml
Normal file
45
.gitea/workflows/main.yaml
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
name: Build and Release Site
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "**"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: nix
|
||||||
|
container:
|
||||||
|
image: docker.io/klakegg/hugo:ext-alpine-ci
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Build Site
|
||||||
|
run: |
|
||||||
|
cd themes/caldwell
|
||||||
|
npm install
|
||||||
|
cd ../..
|
||||||
|
ln -s ./themes/caldwell/node_modules node_modules
|
||||||
|
hugo --config hugo.toml --minify
|
||||||
|
|
||||||
|
- name: Package Site
|
||||||
|
run: |
|
||||||
|
tar -czf site.tar.gz -C public .
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
uses: https://github.com/akkuman/gitea-release-action@main
|
||||||
|
with:
|
||||||
|
name: "Release ${{ github.sha }}"
|
||||||
|
tag_name: "release-${{ github.sha }}"
|
||||||
|
files: site.tar.gz
|
||||||
|
|
||||||
|
- name: Publish
|
||||||
|
env:
|
||||||
|
TARGET_URL: https://blog.karaolidis.com/upload
|
||||||
|
run: |
|
||||||
|
curl -X POST "$TARGET_URL" \
|
||||||
|
-H "Authorization: ${{ secrets.BLOG_API_KEY }}" \
|
||||||
|
-H "Content-Type: application/octet-stream" \
|
||||||
|
--data-binary @site.tar.gz
|
Reference in New Issue
Block a user