Compare commits
No commits in common. "74966a23f69082e4ef708b82a9245a94aaa309b5" and "29c4d4b70f8769a58b4820c293a6f1bed09a4ae4" have entirely different histories.
74966a23f6
...
29c4d4b70f
@ -1,59 +0,0 @@
|
||||
name: Build and copy to prod
|
||||
on:
|
||||
push:
|
||||
schedule:
|
||||
- cron: '0 * * * *'
|
||||
jobs:
|
||||
build-and-copy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 20.x
|
||||
- name: Install dependencies 📦
|
||||
run: npm ci
|
||||
- name: Cache build
|
||||
id: cache-eleventy-build
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .cache
|
||||
key: cache-eleventy-build-${{ gitea.run_id }}
|
||||
restore-keys: |
|
||||
cache-eleventy-build
|
||||
- name: Cache _site
|
||||
id: cache-site
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: _site
|
||||
key: cache-site-${{ gitea.run_id }}
|
||||
restore-keys: |
|
||||
cache-site
|
||||
- name: Build eleventy
|
||||
run: npm run build
|
||||
env:
|
||||
NODE_ENV: production
|
||||
UMAMI_API_KEY: ${{ secrets.UMAMI_API_KEY }}
|
||||
- name: Sync to Bunny
|
||||
run: node ./scripts/upload-to-bunny.js
|
||||
env:
|
||||
BUNNY_STORAGE_ENDPOINT: ${{ secrets.BUNNY_STORAGE_ENDPOINT }}
|
||||
BUNNY_STORAGE_PASSWORD: ${{ secrets.BUNNY_STORAGE_PASSWORD }}
|
||||
BUNNY_STORAGE_BUCKET: ${{ secrets.BUNNY_STORAGE_BUCKET }}
|
||||
- name: Purge XML files from cache
|
||||
run: |
|
||||
curl --request POST \
|
||||
--url 'https://api.bunny.net/purge?url=https%3A%2F%2Flewisdale.dev%2F%2A.xml&async=false' \
|
||||
--header 'AccessKey: ${{ secrets.BUNNY_ACCESS_KEY }}'
|
||||
- name: Purge JSON files from cache
|
||||
run: |
|
||||
curl --request POST \
|
||||
--url 'https://api.bunny.net/purge?url=https%3A%2F%2Flewisdale.dev%2F%2A.json&async=false' \
|
||||
--header 'AccessKey: ${{ secrets.BUNNY_ACCESS_KEY }}'
|
||||
- name: Purge CSS files from cache
|
||||
run: |
|
||||
curl --request POST \
|
||||
--url 'https://api.bunny.net/purge?url=https%3A%2F%2Flewisdale.dev%2F%2A.css&async=false' \
|
||||
--header 'AccessKey: ${{ secrets.BUNNY_ACCESS_KEY }}'
|
17
package-lock.json
generated
17
package-lock.json
generated
@ -30,7 +30,6 @@
|
||||
"markdown-it-obsidian-callouts": "^0.2.6",
|
||||
"markdown-it-prism": "^2.3.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"p-map": "^7.0.2",
|
||||
"postcss": "^8.4.21",
|
||||
"postcss-cli": "^10.1.0",
|
||||
"postcss-import": "^15.1.0",
|
||||
@ -4261,17 +4260,6 @@
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/p-map": {
|
||||
"version": "7.0.2",
|
||||
"resolved": "https://registry.npmjs.org/p-map/-/p-map-7.0.2.tgz",
|
||||
"integrity": "sha512-z4cYYMMdKHzw4O5UkWJImbZynVIo0lSGTXc7bzB1e/rrDqkgGUNysK/o4bTr+0+xKvvLoTyGqYC4Fgljy9qe1Q==",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/p-queue": {
|
||||
"version": "6.6.2",
|
||||
"resolved": "https://registry.npmjs.org/p-queue/-/p-queue-6.6.2.tgz",
|
||||
@ -8998,11 +8986,6 @@
|
||||
"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
|
||||
"integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow=="
|
||||
},
|
||||
"p-map": {
|
||||
"version": "7.0.2",
|
||||
"resolved": "https://registry.npmjs.org/p-map/-/p-map-7.0.2.tgz",
|
||||
"integrity": "sha512-z4cYYMMdKHzw4O5UkWJImbZynVIo0lSGTXc7bzB1e/rrDqkgGUNysK/o4bTr+0+xKvvLoTyGqYC4Fgljy9qe1Q=="
|
||||
},
|
||||
"p-queue": {
|
||||
"version": "6.6.2",
|
||||
"resolved": "https://registry.npmjs.org/p-queue/-/p-queue-6.6.2.tgz",
|
||||
|
@ -41,7 +41,6 @@
|
||||
"markdown-it-obsidian-callouts": "^0.2.6",
|
||||
"markdown-it-prism": "^2.3.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"p-map": "^7.0.2",
|
||||
"postcss": "^8.4.21",
|
||||
"postcss-cli": "^10.1.0",
|
||||
"postcss-import": "^15.1.0",
|
||||
|
@ -1,33 +0,0 @@
|
||||
import pMap from 'p-map';
|
||||
import { readdir, lstat } from 'node:fs/promises';
|
||||
import { createReadStream } from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
|
||||
const config = {
|
||||
endpoint: process.env.BUNNY_STORAGE_ENDPOINT,
|
||||
password: process.env.BUNNY_STORAGE_PASSWORD,
|
||||
bucket: process.env.BUNNY_STORAGE_BUCKET
|
||||
};
|
||||
|
||||
const files = await readdir('./_site', { recursive: true });
|
||||
|
||||
|
||||
await pMap(files, async (file) => {
|
||||
const filePath = path.join('./_site', file);
|
||||
const stat = await lstat(filePath);
|
||||
if (stat.isDirectory()) return;
|
||||
|
||||
const url = `https://${config.endpoint}/${config.bucket}/${file}`;
|
||||
console.log(`Uploading ${filePath} to ${url}`);
|
||||
|
||||
const readStream = createReadStream(filePath);
|
||||
|
||||
await fetch(url, {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
accessKey: config.password,
|
||||
},
|
||||
body: readStream,
|
||||
duplex: 'half'
|
||||
});
|
||||
}, { concurrency: 50 });
|
@ -7,12 +7,12 @@ layout: base.njk
|
||||
<section class="stack-md row h-card">
|
||||
<h1><a href="https://{{ metadata.site.domain }}" rel="me" class="u-url">Hi, I'm <span class="p-given-name">Lewis</span></a></h1>
|
||||
<p class="inline-block max-w-[45ch] p-note">
|
||||
I'm a software engineer who loves building things for the web. I consider myself a generalist, but on a given day I'll probably be working with Typescript, HTML and CSS. I work for <a href="https://triptease.com" target="_blank" rel="noopener noreferrer" class="p-org">Triptease</a> as a Senior Software Engineer.
|
||||
I'm a software engineer who loves building things for the web. I consider myself a generalist, but on a given day I'll probably be working with Typescript, HTML and CSS, and on occasion a touch of .NET. I work for <a href="https://triptease.com" target="_blank" rel="noopener noreferrer" class="p-org">Triptease</a> as a Senior Software Engineer, and on the side I'm learning Rust by building a <a href="/post/creating-a-sinclair-basic-interpreter/">Sinclair BASIC Interpreter</a>.
|
||||
</p>
|
||||
{% image metadata.author.avatar, "My face", "box circle u-photo", "300px", [300] %}
|
||||
|
||||
<p class="p-note">
|
||||
I mostly blog about cycling, software development, and the occasional post about movies & TV.
|
||||
When I'm not working I love cycling, reading fiction (mostly sci-fi and ghost stories), and spending time with my family & our border collie.
|
||||
</p>
|
||||
<p class="p-note">
|
||||
You can find also find me on <a href="https://social.lol/@lewis" rel="me noopener noreferrer" target="_blank">the Fediverse</a>, follow my reading on <a href="https://bookrastinating.com/user/lewisdaleuk" target="_blank" rel="me noopener noreferrer">Bookwyrm</a>, or subscribe to my <a href="/feed/">RSS feed</a>.
|
||||
|
Loading…
Reference in New Issue
Block a user