From dd16cc0039eedda70bff4e05fff8769773ab941a Mon Sep 17 00:00:00 2001 From: Felipe M Date: Fri, 3 Jul 2020 11:01:34 +0200 Subject: [PATCH] -sr.ht +github --- .builds/pages.yml | 27 --------------------------- .github/workflows/deploy.yml | 34 ++++++++++++++++++++++++++++++++++ Makefile | 2 +- README.md | 2 -- templates/blog/post.html | 6 ++---- 5 files changed, 37 insertions(+), 34 deletions(-) delete mode 100644 .builds/pages.yml create mode 100644 .github/workflows/deploy.yml diff --git a/.builds/pages.yml b/.builds/pages.yml deleted file mode 100644 index 907d1c4..0000000 --- a/.builds/pages.yml +++ /dev/null @@ -1,27 +0,0 @@ -image: archlinux -packages: - - python-poetry - - nodejs - - npm - - rsync - - imagemagick -sources: - - https://git.sr.ht/~fmartingr/fmartingr.com -secrets: - - f577557b-ed7b-4ce4-a103-d9c8e692c09b - - 7902c1da-f243-4bb3-a397-dc1c98faa823 - - c82cd104-227b-4745-89ae-960b5f7c82ae -tasks: - # https://todo.sr.ht/~sircmpwn/builds.sr.ht/170 - - check-branch: | - cd fmartingr.com - if [ "$(git rev-parse master)" != "$(git rev-parse HEAD)" ]; then \ - complete-build; \ - fi - - prepare: | - cd fmartingr.com - python -V - make setup - - deploy: | - cd fmartingr.com - poetry run make deploy diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..545a57f --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,34 @@ +name: Build pages + +on: + push: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Setup Node.js environment + uses: actions/setup-node@v2.1.0 + - name: Install dependencies + run: | + python -m pip install --upgrade poetry + poetry install + npm install + - name: Build + run: make build + - name: GitHub Pages action + uses: peaceiris/actions-gh-pages@v3.6.1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_branch: gh-pages + publish_dir: public + force_orphan: true + user_name: Felipe M. + user_email: me@fmartingr.com + cname: fmartingr.com \ No newline at end of file diff --git a/Makefile b/Makefile index 84f3a08..cb42fee 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ setup: build: node_modules/gulp/bin/gulp.js sass node_modules/gulp/bin/gulp.js js - lektor build --prune --output-path ${PWD}/public --buildstate-path ${PWD}/.lektor + poetry run lektor build --prune --output-path ${PWD}/public --buildstate-path ${PWD}/.lektor watch: node_modules/gulp/bin/gulp.js sass:watch diff --git a/README.md b/README.md index c93356e..55dffc3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ # fmartingr.com -[![Last deploy](https://builds.sr.ht/~fmartingr/fmartingr.com/pages.yml.svg)](https://builds.sr.ht/~fmartingr/fmartingr.com/pages.yml?) - Source code for my personal site hosted at [fmartingr.com](https://fmartingr.com) diff --git a/templates/blog/post.html b/templates/blog/post.html index 380535e..8a23acc 100644 --- a/templates/blog/post.html +++ b/templates/blog/post.html @@ -8,10 +8,8 @@ {% block main_content %} {{ render_blog_post(this) }}
- In order to make a public comment on this entry please use - the mailing list - and if you want to approach me directly use the most appropriate channel from - the about page. + If you want to approach me directly about this post use the most appropriate channel + from the about page.
{% endblock %}