mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-12-01 18:42:18 +00:00
Compare commits
No commits in common. "a4107cf8affb6e17b18dee050b6489665289ace0" and "d6ff5027f917cc1619d27356276f20a026f66ae7" have entirely different histories.
a4107cf8af
...
d6ff5027f9
5 changed files with 11 additions and 42 deletions
|
@ -1,4 +1,4 @@
|
||||||
name: Deploy to Production
|
name: Deploy to Neocities
|
||||||
|
|
||||||
# only run on changes to main
|
# only run on changes to main
|
||||||
on:
|
on:
|
||||||
|
@ -9,7 +9,7 @@ on:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
concurrency: # prevent concurrent deploys doing strange things
|
concurrency: # prevent concurrent deploys doing strange things
|
||||||
group: deploy-to-prod
|
group: deploy-to-neocities
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
# Default to bash
|
# Default to bash
|
||||||
|
@ -40,25 +40,9 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
npm i @torchlight-api/torchlight-cli
|
npm i @torchlight-api/torchlight-cli
|
||||||
npx torchlight
|
npx torchlight
|
||||||
- name: Deploy HTML to Neocities
|
- name: Deploy to Neocities
|
||||||
uses: bcomnes/deploy-to-neocities@v1
|
uses: bcomnes/deploy-to-neocities@v1
|
||||||
with:
|
with:
|
||||||
api_token: ${{ secrets.NEOCITIES_API_TOKEN }}
|
api_token: ${{ secrets.NEOCITIES_API_TOKEN }}
|
||||||
cleanup: true
|
cleanup: true
|
||||||
dist_dir: public
|
dist_dir: public
|
||||||
- name: Connect to Tailscale
|
|
||||||
uses: tailscale/github-action@v2
|
|
||||||
with:
|
|
||||||
oauth-client-id: ${{ secrets.TS_API_CLIENT_ID }}
|
|
||||||
oauth-secret: ${{ secrets.TS_API_CLIENT_SECRET }}
|
|
||||||
tags: ${{ secrets.TS_TAG }}
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: shimataro/ssh-key-action@v2
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY }}
|
|
||||||
name: id_rsa
|
|
||||||
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
|
|
||||||
- name: Deploy GMI to Agate
|
|
||||||
run: |
|
|
||||||
rsync -avz --delete --exclude='*.html' --exclude='*.css' --exclude='*.js' -e ssh public/ deploy@${{ secrets.GMI_HOST }}:${{ secrets.GMI_CONTENT_PATH }}
|
|
||||||
|
|
|
@ -27,7 +27,6 @@ enableInlineShortcodes = true
|
||||||
[outputFormats.rss]
|
[outputFormats.rss]
|
||||||
mediatype = "application/rss"
|
mediatype = "application/rss"
|
||||||
baseName = "feed"
|
baseName = "feed"
|
||||||
# gemini output
|
|
||||||
[outputFormats.gemini]
|
[outputFormats.gemini]
|
||||||
mediatype = "text/gemini"
|
mediatype = "text/gemini"
|
||||||
isPlainText = true
|
isPlainText = true
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
# Quick script to serve gemini locally
|
|
||||||
hugo --environment local -D
|
|
||||||
agate --content public --hostname localhost
|
|
|
@ -1,12 +1,7 @@
|
||||||
# [runtimeterror $]
|
## [runtimeterror $]
|
||||||
=> /about Adventures in self-hosting and other technological frustrations.
|
|
||||||
{{ $pages := .Pages -}}
|
{{ $pages := .Pages -}}
|
||||||
{{ $pages = where site.RegularPages "Type" "in" site.Params.mainSections -}}
|
{{ $pages = where site.RegularPages "Type" "in" site.Params.mainSections -}}
|
||||||
|
|
||||||
### Posts
|
|
||||||
{{ range $pages }}
|
{{ range $pages }}
|
||||||
=> {{ .RelPermalink }} {{ .Date.Format "2006-01-02" }} {{ .Title }}
|
=> {{ .RelPermalink }} [{{ .Date.Format "2006-01-02" }}] {{ .Title }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
---
|
|
||||||
=> https://runtimeterror.dev This site on the big web
|
|
|
@ -1,12 +1,6 @@
|
||||||
=> / 💻 [runtimeterror $]
|
=> / 🏡 [runtimeterror $]
|
||||||
|
|
||||||
# {{ .Title }}{{ $scratch := newScratch }}
|
# {{ .Title }}{{ $scratch := newScratch }}
|
||||||
{{- if .Params.Date }}
|
|
||||||
{{- $postDate := .Date.Format "2006-01-02" }}
|
|
||||||
{{- $updateDate := .Lastmod.Format "2006-01-02" }}
|
|
||||||
{{ $postDate }}{{ if ne $postDate $updateDate }} ~ {{ $updateDate }}{{ end }}
|
|
||||||
{{- end }}
|
|
||||||
{{/* The bulk of this regex magic is derived from https://brainbaking.com/post/2021/04/using-hugo-to-launch-a-gemini-capsule/ */}}
|
|
||||||
{{ $content := .RawContent -}}
|
{{ $content := .RawContent -}}
|
||||||
{{ $content := $content | replaceRE `#### ` "### " -}}
|
{{ $content := $content | replaceRE `#### ` "### " -}}
|
||||||
{{ $content := $content | replaceRE `\n- (.+?)` "\n* $1" -}}
|
{{ $content := $content | replaceRE `\n- (.+?)` "\n* $1" -}}
|
||||||
|
@ -30,9 +24,10 @@
|
||||||
{{ $content | safeHTML }}
|
{{ $content | safeHTML }}
|
||||||
|
|
||||||
---
|
---
|
||||||
|
Written by John Bowdre {{ if .Params.Date }} on {{ .Lastmod.Format "2006-01-02" }}.{{ end}}
|
||||||
=> mailto:blog@runtimeterror.dev 📧 Reply via email
|
=> mailto:blog@runtimeterror.dev 📧 Reply via email
|
||||||
|
|
||||||
## Bibliography
|
## Links
|
||||||
{{ $scratch.Set "ref" (add (len $links) 1) }}{{ range $refs }}{{ $ref := $scratch.Get "ref" }}{{ $url := (printf "%s #%d" . $ref) }}
|
{{ $scratch.Set "ref" (add (len $links) 1) }}{{ range $refs }}{{ $ref := $scratch.Get "ref" }}{{ $url := (printf "%s #%d" . $ref) }}
|
||||||
=> {{ $url | replaceRE `\[(.+?)\]\((.+?)\) #(\d+)` "$2 [$3] $1 ($2)" -}}
|
=> {{ $url | replaceRE `\[(.+?)\]\((.+?)\) #(\d+)` "$2 [$3] $1 ($2)" -}}
|
||||||
{{ $scratch.Set "ref" (add $ref 1) }}{{ end}}
|
{{ $scratch.Set "ref" (add $ref 1) }}{{ end}}
|
||||||
|
@ -43,5 +38,5 @@
|
||||||
=> {{ replace .RelPermalink "/gemini" "" 1}} {{ .Title }}{{ end }}{{ end }}
|
=> {{ replace .RelPermalink "/gemini" "" 1}} {{ .Title }}{{ end }}{{ end }}
|
||||||
---
|
---
|
||||||
|
|
||||||
=> / Home
|
=> / Back to the Index
|
||||||
=> https://runtimeterror.dev{{ replace (replace .RelPermalink "/gemini" "" 1) "index.gmi" "" }} This article on the big web
|
=> https://runtimeterror.dev{{ replace (replace .RelPermalink "/gemini" "" 1) "index.gmi" "" }} View this article on the WWW
|
Loading…
Reference in a new issue