diff --git a/.forgejo/workflows/cicd.yaml b/.forgejo/workflows/cicd.yaml new file mode 100644 index 0000000..9399647 --- /dev/null +++ b/.forgejo/workflows/cicd.yaml @@ -0,0 +1,23 @@ +--- +env: + DEPLOY_REMOTE: www-cfebscom@cfebs.com + +on: [push] +jobs: + build: + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + runs-on: docker + container: + image: forge.cfebs.com/cfebs/node-util:20 + steps: + - name: checkout + uses: https://code.forgejo.org/actions/checkout@v4 + + - name: build + run: python3 ./main.py + + - name: deploy + run: | + eval $(ssh-agent -s) + ssh-add <(echo "${{ secrets.FORGE_DEPLOY_PRIVATE_KEY }}") + rsync -r --delete -v --rsh="ssh -o StrictHostKeyChecking=no" -r ./public/ $DEPLOY_REMOTE:/home/www-cfebscom/public/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 6114565..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -default: - image: alpine:3.20 - -deploy-pages: - script: - - 'apk add python3 py3-markdown' - - python3 ./main.py - pages: true - artifacts: - paths: - - public diff --git a/README.md b/README.md index 51dfea4..8e217e2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# cfebs.srht.site +# cfebs.com A blog generator. diff --git a/posts/build_a_blog.md b/posts/build_a_blog.md index e2d2d74..afe4edd 100644 --- a/posts/build_a_blog.md +++ b/posts/build_a_blog.md @@ -654,11 +654,11 @@ And - it was fun to write and write about. View the complete source for generating this blog: -* [main.py](https://git.sr.ht/~cfebs/cfebs.srht.site/tree/main/item/main.py) -* [index.html.tmpl](https://git.sr.ht/~cfebs/cfebs.srht.site/tree/main/item/index.html.tmpl) -* [index.xml.tmpl](https://git.sr.ht/~cfebs/cfebs.srht.site/tree/main/item/index.xml.tmpl) +* [main.py](https://forge.cfebs.com/cfebs/blog/src/branch/main/main.py) +* [index.html.tmpl](https://forge.cfebs.com/cfebs/blog/src/branch/main/index.html.tmpl) +* [index.xml.tmpl](https://forge.cfebs.com/cfebs/blog/src/branch/main/index.xml.tmpl) -Or the full repo tree: +Or the full repo tree: ## EDIT @@ -925,4 +925,4 @@ But now down to ~1.5s for 1000 posts 🎉 [4]: https://python-markdown.github.io/ [5]: https://archlinux.org/packages/extra/any/python-markdown/ [hugo]: https://gohugo.io/ -[duped]: https://git.sr.ht/~cfebs/cfebs.srht.site/commit/4b39494e827245ce1fbf1cbd983786e8db34c645 +[duped]: https://forge.cfebs.com/cfebs/blog/commit/4b39494e827245ce1fbf1cbd983786e8db34c645