update + actions maybe
Publish / build (push) Failing after 6m37s Details

Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
Sam Therapy 2024-04-02 18:03:49 +02:00
parent caa06e134e
commit abce7a1865
Signed by: sam
GPG Key ID: 4D8B07C18F31ACBD
9 changed files with 105 additions and 67 deletions

View File

@ -1,48 +0,0 @@
kind: pipeline
type: docker
name: Build & Deploy
steps:
- name: Build site
image: denoland/deno
commands:
- deno task build
- name: Deploy to Deno Deploy
image: git.froth.zone/sam/drone-deno-deploy
environment:
DENO_DEPLOY_TOKEN:
from_secret: DENO_DEPLOY_TOKEN
settings:
project: samme
entrypoint: serve.ts
production: true
include: _site,serve.ts,deno.json
import_map: deno.json
depends_on:
- "Build site"
when:
branch:
- master
event:
- push
- name: Push to Pages
image: plugins/gh-pages
settings:
remote_url:
from_secret: URL
password:
from_secret: PASS
target_branch: pages
pages_directory: _site
copy_contents: true
user_name: Sam Therapy
user_email: sam@samtherapy.net
depends_on:
- "Build site"
when:
branch:
- master
event:
- push

40
.github/workflows/deploy.yaml vendored Normal file
View File

@ -0,0 +1,40 @@
name: Publish
on:
push:
branches: [ master ]
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Build site
run: deno task build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/master'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_site
force_orphan: true
publish_branch: pages
- name: Deploy to Deno Deploy
uses: samtherapy/deno-deploy@master
with:
deno_deploy_token: ${{ secrets.DENO_DEPLOY_TOKEN }}
entry_point: serve.ts
project: samme
production: true

View File

@ -1,4 +1,4 @@
import lumeCMS from "lume/cms.ts";
import lumeCMS from "lume/cms/mod.ts";
const cms = lumeCMS();
@ -62,6 +62,7 @@ cms.document(
},
"text: text",
"href: text",
"only_icon: checkbox",
],
},
{

View File

@ -1,6 +1,7 @@
{
"imports": {
"lume/": "https://deno.land/x/lume@v2.1.2/"
"lume/": "https://deno.land/x/lume@v2.1.2/",
"lume/cms/": "https://cdn.jsdelivr.net/gh/lumeland/cms@0.3.9/"
},
"tasks": {
"lume": "echo \"import 'lume/cli.ts'\" | deno run -A -",
@ -15,4 +16,4 @@
"exclude": [
"./_site"
]
}
}

View File

@ -39,15 +39,6 @@ export default function () {
return (onWhite + 0.5) > onBlack ? "white" : "black";
});
site.data("transformImages", {
resize: [300, 300],
format: "webp",
});
// Basic CSS Design System
site.remoteFile(
"_includes/css/ds.css",
"https://unpkg.com/@lumeland/ds@0.5.1/ds.css",
);
site.copy([".jpg", ".webp", ".png"]);
};
}

View File

@ -16,6 +16,7 @@
box-shadow: 0 2px 10px -8px #0009;
}
}
.button:not(.is-primary) {
background: var(--bg-color);
color: var(--text-color);
@ -32,4 +33,35 @@
.link-list .button {
border: solid 1px #FFFFFF16;
}
}
.icon-list {
list-style: none;
margin: 0 0 min(5vh, 100px);
padding: 0;
display: flex;
gap: 10px;
justify-content: center;
svg {
width: 20px;
height: 20px;
fill: currentColor;
}
.button {
display: flex;
font: var(--font-body-bold);
transition: transform 200ms;
&:hover {
transform: scale(1.05);
box-shadow: 0 2px 10px -8px #0009;
}
}
.button:not(.is-primary) {
background: var(--bg-color);
color: var(--text-color);
}
}

View File

@ -39,11 +39,26 @@
{{ header.description |> md }}
</header>
<ul class="link-list">
{{ for link of links }}
{{> const icons = links.filter((link) => link.only_icon) }}
{{ if icons.length }}
<ul class="icon-list">
{{ for link of icons }}
{{> let i = icon(link.type) }}
<li>
<a href="{{ link.href }}" rel="me" class="button" style="--bg-color:{{ link.hex || `#${i?.hex || "fff" }` }}; --text-color:{{ link.textColor || textColor(i?.hex || "fff") }}">
<a href="{{ link.href }}" class="button" style="--bg-color:{{ link.hex || `#${i?.hex || "fff" }` }}; --text-color:{{ link.textColor || textColor(i?.hex || "fff") }}" title="{{ link.text }}">
{{ i?.svg }}
</a>
</li>
{{ /for }}
</ul>
{{ /if }}
<ul class="link-list">
{{ for link of links.filter((link) => !link.only_icon) }}
{{> let i = icon(link.type) }}
<li>
<a href="{{ link.href }}" class="button" style="--bg-color:{{ link.hex || `#${i?.hex || "fff" }` }}; --text-color:{{ link.textColor || textColor(i?.hex || "fff") }}">
{{ i?.svg }}
{{ link.text }}
</a>

View File

@ -2,7 +2,7 @@ layout: layouts/base.vto
header:
title: Sam Therapy
description: Nowhere ~~and everywhere~~ all at once.
avatar: /avatar.webp
avatar: /avatar.png
metas:
title: =header.title
description: =header.description
@ -13,26 +13,32 @@ links:
- text: Git
href: 'https://git.froth.zone/sam'
type: forgejo
only_icon: false
- type: writedotas
text: Blog
href: 'https://blog.froth.zone/sam'
only_icon: false
- type: matrix
text: Matrix
href: 'https://matrix.to/#/@samme:schizo.cafe'
only_icon: false
- type: xmpp
text: 'XMPP (Fallback, please use Matrix if possible)'
href: 'xmpp://sam@samtherapy.net'
only_icon: false
- type: bluesky
text: Bluesky
href: 'https://bsky.app/profile/samtherapy.net'
only_icon: false
- type: nostr
text: Nostr (I don't like using it but I have one)
href: >-
https://njump.me/nprofile1qyfhwumn8ghj7mmxve3ksctfdch8qatz9uq3vamnwvaz7tmjv4kxz7fwd4hhxarj9ec82c30qythwumn8ghj7un9d3shjtnxwfhhg6pw0fhkuef0qqs9gymnvuqhq66973gsat9rnh44v9la7qmss2xk747z5tv263zydzq2nr59m
only_icon: false
- type: activitypub
text: Coming back never
href: 'https://froth.zone/users/sam'
only_icon: false
footer: >-
Powered by [Lume](https://lume.land) &
[SimpleMe](https://github.com/lumeland/theme-simple-me) theme
extra_head: ''

View File

@ -1,5 +1,5 @@
/* Lume's design system */
@import "css/ds.css";
@import "https://unpkg.com/@lumeland/ds@0.5.2/ds.css";
/* Custom components */
@import "css/header.css";