M .builds/publish.yml => .builds/publish.yml +15 -13
@@ 1,3 1,4 @@
+---
image: alpine/edge
sources:
- https://git.hut.ccw.icu/~comcloudway/pages
@@ 7,23 8,24 @@ packages:
- sed
- pandoc
# deploy dependencies
- - rsync
+ - s3fs-fuse
secrets:
-# file containing rsync password.
-# format: RSYNC_PASSWORD="<yourpassword>"
-- c092726a-e17c-4498-adbf-90cd4771b5eb
+ # s3fs passwd file
+ - 52590bef-f27a-4b05-8262-4d14e68486e9
environment:
domain: "https://ccw.icu"
- target: "rsync://deploy@ccw.icu:29493/pages"
+ builddir: "pages/build"
+ s3_url: "https://s3.ccw.icu"
+ s3_bucket: "website"
tasks:
+ - prepare: |
+ # setup s3fs
+ sudo modprobe fuse
+ sudo mv ~/.passwd-s3fs /etc/passwd-s3fs
+ mkdir -p $builddir
+ sudo s3fs $s3_bucket ~/$builddir -o url=$s3_url -o use_path_request_style -o umask=0007,uid=$(id -u) -o allow_other
- builds: |
cd pages
bash ./build.sh $domain
- - deploy: |
- cd pages
- set +x # hide secret
- set -a # load variable from file even without export
- source ~/.rsyncpass
- set +a
- set -x
- rsync -Irtlzv ./build/* $target
+ - cleanup: |
+ sudo umount ~/$builddir
D .domains => .domains +0 -2
@@ 1,2 0,0 @@
-ccw.icu
-www.ccw.icu
D .woodpecker.yml => .woodpecker.yml +0 -16
@@ 1,16 0,0 @@
----
-pipeline:
- # build static content
- build:
- image: alpine
- commands:
- - apk add bash sed pandoc
- - bash ./build.sh https://ccw.icu
- # publish content
- publish:
- image: alpine
- secrets: [deploy_pass]
- commands:
- - apk add rsync
- - export RSYNC_PASSWORD="$${DEPLOY_PASS}"
- - rsync -Irtlzv ./build/* rsync://deploy@ccw.icu:29493/pages
A README.md => README.md +25 -0
@@ 0,0 1,25 @@
+# ccw.icu
+This repo contains the feed source code for my website.
+
+To view the content of my web page,
+you can visit [ccw.icu](https://ccw.icu).
+
+# Building
+## Dependencies
+- `pandoc`
+- `sed`
+- `awk`
+- `bash`
+
+## Deploy
+To generate the HTML build output,
+simply execute the `build.sh` file.
+Afterwards the build output can be found in the `build/` folder.
+
+To get a local server running,
+you can use `serve build`
+
+## Hosting
+I'm currently serving the files directly from an `s3`-bucket using caddy.
+
+[![builds.sr.ht status](https://builds.hut.ccw.icu/~comcloudway/pages.svg)](https://builds.hut.ccw.icu/~comcloudway/pages?)
D README.org => README.org +0 -26
@@ 1,26 0,0 @@
-* ccw.icu
-This repo contains the feed source code for my website.
-
-To view the content of my web page,
-you can visit [[https://ccw.icu][ccw.icu]] or explore it [[./src/index.org][locally]].
-
-* Building
-** Dependencies
-- ~pandoc~
-- ~sed~
-- ~awk~
-- ~bash~
-
-** Deploy
-To generate the HTML build output,
-simply execute the ~build.sh~ file.
-Afterwards the build output can be found in the ~build/~ folder.
-
-To get a local server running,
-you can use ~serve build~
-
-** Hosting
-I'm currently using ~nginx~ and ~rsyncd~,
-running in separate docker containers.
-
-Have a look at my [[https://codeberg.org/comcloudway/docker-rsyncd/src/branch/main/docker-compose.yml][docker-rsyncd]] image for more information.
M build.sh => build.sh +2 -2
@@ 39,10 39,10 @@ function convertOrg() {
sed -r "s/([\.]+\/[A-z\/\.0-9_-]*)\.org/\1\.$pandocTargetExtension/g"
}
-# delete old build artifacts
-rm -rf $builddir
# create new build folder
mkdir -p $builddir
+# delete old build artifacts
+rm -rf $builddir/*
# ASSETS
cp $assetdir/* -r $builddir