mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-11-09 17:42:19 +00:00
use berkeley mono in og_base image
retrieve ttf from within tailnet to avoid publishing it publicly
This commit is contained in:
parent
c3ba2515f6
commit
109685d2b1
2 changed files with 23 additions and 13 deletions
24
.github/workflows/deploy-to-prod.yml
vendored
24
.github/workflows/deploy-to-prod.yml
vendored
|
@ -32,8 +32,19 @@ jobs:
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
- 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: Configure SSH known hosts
|
||||||
|
run: |
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
echo "${{ secrets.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts
|
||||||
|
chmod 644 ~/.ssh/known_hosts
|
||||||
- name: Build with Hugo
|
- name: Build with Hugo
|
||||||
run: hugo --minify
|
run: HUGO_REMOTE_FONT_PATH=${{ secrets.REMOTE_FONT_PATH }} hugo --minify
|
||||||
- name: Insert 404 page
|
- name: Insert 404 page
|
||||||
run: |
|
run: |
|
||||||
cp public/404/index.html public/not_found.html
|
cp public/404/index.html public/not_found.html
|
||||||
|
@ -47,17 +58,6 @@ jobs:
|
||||||
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: Configure SSH known hosts
|
|
||||||
run: |
|
|
||||||
mkdir -p ~/.ssh
|
|
||||||
echo "${{ secrets.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts
|
|
||||||
chmod 644 ~/.ssh/known_hosts
|
|
||||||
- name: Deploy GMI to Agate
|
- name: Deploy GMI to Agate
|
||||||
run: |
|
run: |
|
||||||
rsync -avz --delete --exclude='*.html' --exclude='*.css' --exclude='*.js' -e ssh public/ deploy@${{ secrets.GMI_HOST }}:${{ secrets.GMI_CONTENT_PATH }}
|
rsync -avz --delete --exclude='*.html' --exclude='*.css' --exclude='*.js' -e ssh public/ deploy@${{ secrets.GMI_HOST }}:${{ secrets.GMI_CONTENT_PATH }}
|
||||||
|
|
|
@ -1,6 +1,16 @@
|
||||||
{{ $img := resources.Get "og_base.png" }}
|
{{ $img := resources.Get "og_base.png" }}
|
||||||
{{ $font := resources.Get "/FiraMono-Regular.ttf" }}
|
|
||||||
{{ $text := "" }}
|
{{ $text := "" }}
|
||||||
|
{{ $font := "" }}
|
||||||
|
{{ $path := os.Getenv "HUGO_REMOTE_FONT_PATH" }}
|
||||||
|
{{ with resources.GetRemote $path }}
|
||||||
|
{{ with .Err }}
|
||||||
|
{{ errorf "%s" . }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $font = . }}
|
||||||
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
|
{{ errorf "Unable to get resource %q" $path }}
|
||||||
|
{{ end }}
|
||||||
<meta property="og:title" content="{{ .Title }}" />
|
<meta property="og:title" content="{{ .Title }}" />
|
||||||
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
|
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
|
||||||
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
|
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
|
||||||
|
|
Loading…
Reference in a new issue