fix deploy
All checks were successful
Deploy mkdocs based site / deploy (push) Successful in 50s

This commit is contained in:
Neil Hanlon 2025-07-01 12:01:25 -04:00
commit 1ac449ecc6
Signed by: neil
GPG key ID: 1FCD053809D422CB
7 changed files with 135 additions and 108 deletions

View file

@ -29,15 +29,15 @@ jobs:
run: npm install @fastly/js-compute @fastly/compute-js-static-publish
- name: Build Compute Package
uses: fastly/compute-actions/build@v11
with:
project_directory: compute-js
run: |
pushd compute-js || exit 2
npm run build
- name: Deploy Compute Package
uses: fastly/compute-actions/deploy@v11
with:
project_directory: compute-js
comment: "Deployed via Forgejo Actions for ${{ github.head_ref }}.${{ github.sha }}"
run: |
pushd compute-js || exit 2
npm run fastly:deploy
npm run fastly:publish
env:
FASTLY_API_TOKEN: ${{ secrets.FASTLY_API_TOKEN }}

View file

@ -10,3 +10,17 @@ service_id = "kH85PxHe4Um4gq8hnVIsB4"
[scripts]
build = "npm run build"
[local_server]
[local_server.kv_stores]
[local_server.kv_stores.'sig-security']
file = "./static-publisher/kvstore.json"
format = "json"
[setup]
[setup.kv_stores]
[setup.kv_stores.'sig-security']

View file

@ -7,16 +7,15 @@
"": {
"name": "sig-cloud.rocky.page",
"version": "0.1.0",
"license": "UNLICENSED",
"dependencies": {
"@fastly/js-compute": "^3.0.0"
"@fastly/js-compute": "^3.26.0"
},
"devDependencies": {
"@fastly/cli": "^10.14.0",
"@fastly/compute-js-static-publish": "6.2.0"
"@fastly/cli": "^11.2.0",
"@fastly/compute-js-static-publish": "^7.0.1"
},
"engines": {
"node": ">=18.0.0"
"node": ">=20.11.0"
}
},
"node_modules/@bytecodealliance/componentize-js": {
@ -624,11 +623,10 @@
}
},
"node_modules/@fastly/cli": {
"version": "10.19.0",
"resolved": "https://registry.npmjs.org/@fastly/cli/-/cli-10.19.0.tgz",
"integrity": "sha512-JEUGldaqfAkH1x2v6Xrw8C0i99tBZeJ6RMW+9g97ZBkB95TS29jZXWgbdq84Ua5VnjtVLtRQZbA3BoDSS9Zwog==",
"version": "11.3.0",
"resolved": "https://registry.npmjs.org/@fastly/cli/-/cli-11.3.0.tgz",
"integrity": "sha512-hZCJZDweIZKzMWpvKh7A7Ajaj5Q81apFhGLsqIS9SvC5kB1SGXFWw/+/J/c6WMJTBoSBhWZ9qTV4mEtg46OA5g==",
"dev": true,
"license": "Apache-2.0",
"bin": {
"fastly": "fastly.js"
},
@ -636,25 +634,24 @@
"node": ">=16"
},
"optionalDependencies": {
"@fastly/cli-darwin-arm64": "=10.19.0",
"@fastly/cli-darwin-x64": "=10.19.0",
"@fastly/cli-linux-arm64": "=10.19.0",
"@fastly/cli-linux-x32": "=10.19.0",
"@fastly/cli-linux-x64": "=10.19.0",
"@fastly/cli-win32-arm64": "=10.19.0",
"@fastly/cli-win32-x32": "=10.19.0",
"@fastly/cli-win32-x64": "=10.19.0"
"@fastly/cli-darwin-arm64": "=11.3.0",
"@fastly/cli-darwin-x64": "=11.3.0",
"@fastly/cli-linux-arm64": "=11.3.0",
"@fastly/cli-linux-x32": "=11.3.0",
"@fastly/cli-linux-x64": "=11.3.0",
"@fastly/cli-win32-arm64": "=11.3.0",
"@fastly/cli-win32-x32": "=11.3.0",
"@fastly/cli-win32-x64": "=11.3.0"
}
},
"node_modules/@fastly/cli-darwin-arm64": {
"version": "10.19.0",
"resolved": "https://registry.npmjs.org/@fastly/cli-darwin-arm64/-/cli-darwin-arm64-10.19.0.tgz",
"integrity": "sha512-7X7YJDztGOmZuEd9da60SMmsbrGFZ8ednA/K6tymL7Kxd/xbFiXCHC4wTs2VwN/U0bz7F/zE/mrsKgIIXNzLmA==",
"version": "11.3.0",
"resolved": "https://registry.npmjs.org/@fastly/cli-darwin-arm64/-/cli-darwin-arm64-11.3.0.tgz",
"integrity": "sha512-/Ypq728Z7PPRuGLjSfmgYeL2CFpkGWEsw8uEPkL9KOPHg7HsNkws02bXN712jD5/uMCGwmh5zE0bpe8sALJ0sw==",
"cpu": [
"arm64"
],
"dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
"darwin"
@ -664,14 +661,13 @@
}
},
"node_modules/@fastly/cli-darwin-x64": {
"version": "10.19.0",
"resolved": "https://registry.npmjs.org/@fastly/cli-darwin-x64/-/cli-darwin-x64-10.19.0.tgz",
"integrity": "sha512-ovHkNmyRi5x9debT4ziOsnOfWj3J75kqyxLRqOZhcaVA3uDh/SZUyoJ0AeLaULb61h9EP+fAZVpOm2FEcL/Sjg==",
"version": "11.3.0",
"resolved": "https://registry.npmjs.org/@fastly/cli-darwin-x64/-/cli-darwin-x64-11.3.0.tgz",
"integrity": "sha512-/4YVo6GNH2Je7LcTr2GjxirdqH+C/jYE1nvu/V0OQahEGikWn5emR9T7rpvUYAXvneMgmMeSksYunHrj/bOuBQ==",
"cpu": [
"x64"
],
"dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
"darwin"
@ -681,14 +677,13 @@
}
},
"node_modules/@fastly/cli-linux-arm64": {
"version": "10.19.0",
"resolved": "https://registry.npmjs.org/@fastly/cli-linux-arm64/-/cli-linux-arm64-10.19.0.tgz",
"integrity": "sha512-Oqh5XetfGZfb78DQ5VzhRIeV2+yWDIN69AOKcFKjdO97xG426sEzAxw7iK2tmDfNku9X2uT1vHq/HyviIwXwIA==",
"version": "11.3.0",
"resolved": "https://registry.npmjs.org/@fastly/cli-linux-arm64/-/cli-linux-arm64-11.3.0.tgz",
"integrity": "sha512-aRPjI7BJmaWnjHjNo5B8yzEQ0Po5VvhQ/5MVW7LubsSWj4SlCRgEOWH5Pzga3Ih71upZdhy29lGcrzG3NEhcqw==",
"cpu": [
"arm64"
],
"dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
"linux"
@ -698,14 +693,13 @@
}
},
"node_modules/@fastly/cli-linux-x32": {
"version": "10.19.0",
"resolved": "https://registry.npmjs.org/@fastly/cli-linux-x32/-/cli-linux-x32-10.19.0.tgz",
"integrity": "sha512-njCsahSBHNdJ78k4+ufaaRnrhVef8ILd8u98x+KHkaAjTqBbzHjV5Fg9QCAMeSQJxgMr8amYPuS/cuG8zi1UgQ==",
"version": "11.3.0",
"resolved": "https://registry.npmjs.org/@fastly/cli-linux-x32/-/cli-linux-x32-11.3.0.tgz",
"integrity": "sha512-zJMFlV5z8mhmJm+cA78o6mX7Jo32r2BUJhyAgOlmbCFAIrlaDQ9H9WYKdR0vdDraezW4lv0lg/cRXywSVB/Opw==",
"cpu": [
"x32"
],
"dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
"linux"
@ -715,14 +709,13 @@
}
},
"node_modules/@fastly/cli-linux-x64": {
"version": "10.19.0",
"resolved": "https://registry.npmjs.org/@fastly/cli-linux-x64/-/cli-linux-x64-10.19.0.tgz",
"integrity": "sha512-HS11DVydbdZyAzCruAcwtOtW1G31E+YOA1nZ/zycl2FR3vjXxSl/jIdp4YQtg2FIFGO9cnLLMgqa3apIjJ3CRg==",
"version": "11.3.0",
"resolved": "https://registry.npmjs.org/@fastly/cli-linux-x64/-/cli-linux-x64-11.3.0.tgz",
"integrity": "sha512-7Swd7zlD0jI55j37aImts+CNoKCSvBvU7NVC6OixTHh8kyb6THiE7DjSoBD2MJ5ZMom7CIsZXBuZoP8R5IGsfw==",
"cpu": [
"x64"
],
"dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
"linux"
@ -732,14 +725,13 @@
}
},
"node_modules/@fastly/cli-win32-arm64": {
"version": "10.19.0",
"resolved": "https://registry.npmjs.org/@fastly/cli-win32-arm64/-/cli-win32-arm64-10.19.0.tgz",
"integrity": "sha512-IbWGgRIqewk+uYIFd35qmneIDqTF9wODmSBNmIiZWshSuHOR4d2vJONBIZ8GD7IKwqLUcfiSttotTj/jCGyNUw==",
"version": "11.3.0",
"resolved": "https://registry.npmjs.org/@fastly/cli-win32-arm64/-/cli-win32-arm64-11.3.0.tgz",
"integrity": "sha512-VnysMt4GhV8Pk/aRE0opAX/FU3svDlrvd6KY2vQcWfo3wsPJ/FVzsyc3g1pJab+DN0jOHCYHP4QwH0s5vBwtqA==",
"cpu": [
"arm64"
],
"dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
"win32"
@ -749,14 +741,13 @@
}
},
"node_modules/@fastly/cli-win32-x32": {
"version": "10.19.0",
"resolved": "https://registry.npmjs.org/@fastly/cli-win32-x32/-/cli-win32-x32-10.19.0.tgz",
"integrity": "sha512-sRviW0SpqhtAqEGm66R8qdG92GQNC8a/U2nEoubl+QJ3n6G0BLjtrg49g8DRU/WAZhZLj6PVkeDEsPexwuwUqQ==",
"version": "11.3.0",
"resolved": "https://registry.npmjs.org/@fastly/cli-win32-x32/-/cli-win32-x32-11.3.0.tgz",
"integrity": "sha512-0R4zFl+av9xTG1MJ9nmJJMp4wCJ8GiaErisUjP+pGynOgupVMgvHcvFA0cBdQDkOmcLmr5nUE0iy3HPDJY3CWg==",
"cpu": [
"x32"
],
"dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
"win32"
@ -766,14 +757,13 @@
}
},
"node_modules/@fastly/cli-win32-x64": {
"version": "10.19.0",
"resolved": "https://registry.npmjs.org/@fastly/cli-win32-x64/-/cli-win32-x64-10.19.0.tgz",
"integrity": "sha512-OZC2otvPCgckIJhRijwj2tbJooP1Iufkfe6yey42r5Qvji9YKrawAwWcuCP05aD9d2Sp+rev3zJXkpWH+yKmZw==",
"version": "11.3.0",
"resolved": "https://registry.npmjs.org/@fastly/cli-win32-x64/-/cli-win32-x64-11.3.0.tgz",
"integrity": "sha512-cmUa6vkE1EamOSSXRCBD6Uid9FW87GbKWffPkq04Zre6fyC4t5OHvdEbHuCSi/r4jF9YAA6Zc6xxIwkn6w3BiQ==",
"cpu": [
"x64"
],
"dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
"win32"
@ -783,30 +773,30 @@
}
},
"node_modules/@fastly/compute-js-static-publish": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/@fastly/compute-js-static-publish/-/compute-js-static-publish-6.2.0.tgz",
"integrity": "sha512-Em2V3R1WyXfQilEi3UAUcoy9Yde+uG9fQlzKEFvZpePTSubtZMeNirSSmWrEX5uQoKDRB7ureKXAwF5ksWZjcw==",
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/@fastly/compute-js-static-publish/-/compute-js-static-publish-7.0.1.tgz",
"integrity": "sha512-BzdyR5ecSwajwPW8/3krWpvo5xmwGCsLt0LntseG2PSEuX0QeqEAF+fGUhFCOy1EhIgUYflUdR07ttz7/118rA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@fastly/cli": "^11.2.0",
"command-line-args": "^5.2.1",
"glob-to-regexp": "^0.4.1"
"glob-to-regexp": "^0.4.1",
"toml": "^3.0.0"
},
"bin": {
"compute-js-static-publish": "build/cli/index.js"
},
"engines": {
"node": ">=18"
"node": ">=20.11.0"
},
"peerDependencies": {
"@fastly/js-compute": "^2.0.0 || ^3.0.0"
"@fastly/js-compute": "^3.33.2"
}
},
"node_modules/@fastly/js-compute": {
"version": "3.32.2",
"resolved": "https://registry.npmjs.org/@fastly/js-compute/-/js-compute-3.32.2.tgz",
"integrity": "sha512-WgLTC6F7OE+siZDjunP+hshoMu7jM0UAL2hV8anWLXpxhl+cFUBxQ147Wv5I6Bj7dqOn7wemly2yxfz2ooqDag==",
"license": "Apache-2.0",
"version": "3.34.0",
"resolved": "https://registry.npmjs.org/@fastly/js-compute/-/js-compute-3.34.0.tgz",
"integrity": "sha512-gHAj6MMzZkQWk6uXCipLnH+hluMTdlsNdvS59M7MMkM6gCcfF3xkglX9NB4i7Gv6T4lCwVCT5+bacS85699jVg==",
"dependencies": {
"@bytecodealliance/jco": "^1.7.0",
"@bytecodealliance/weval": "^0.3.2",
@ -2232,6 +2222,12 @@
"integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==",
"license": "MIT"
},
"node_modules/toml": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/toml/-/toml-3.0.0.tgz",
"integrity": "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==",
"dev": true
},
"node_modules/tslib": {
"version": "2.8.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",

View file

@ -5,21 +5,21 @@
"author": "infrastructure@rockylinux.org",
"type": "module",
"devDependencies": {
"@fastly/cli": "^10.14.0",
"@fastly/compute-js-static-publish": "6.2.0"
"@fastly/cli": "^11.2.0",
"@fastly/compute-js-static-publish": "^7.0.1"
},
"dependencies": {
"@fastly/js-compute": "^3.0.0"
"@fastly/js-compute": "^3.26.0"
},
"engines": {
"node": ">=18.0.0"
"node": ">=20.11.0"
},
"license": "UNLICENSED",
"private": true,
"scripts": {
"start": "fastly compute serve",
"deploy": "fastly compute publish",
"prebuild": "npx @fastly/compute-js-static-publish --build-static",
"dev:publish": "npx @fastly/compute-js-static-publish publish-content --local",
"dev:start": "fastly compute serve",
"fastly:deploy": "fastly compute publish",
"fastly:publish": "npx @fastly/compute-js-static-publish publish-content",
"build": "js-compute-runtime ./src/index.js ./bin/main.wasm"
}
}
}

View file

@ -0,0 +1,32 @@
/*
* Generated by @fastly/compute-js-static-publish.
*/
// Commented items are defaults, feel free to modify and experiment!
// See README for a detailed explanation of the configuration options.
/** @type {import('@fastly/compute-js-static-publish').PublishContentConfig} */
const config = {
rootDir: "../site",
// excludeDirs: [ './node_modules' ],
// excludeDotFiles: true,
// includeWellKnown: true,
// kvStoreAssetInclusionTest: (assetKey) => true,
// contentCompression: [ 'br', 'gzip' ],
// contentTypes: [
// { test: /.custom$/, contentType: 'application/x-custom', text: false },
// ],
// Server settings are saved to the KV Store per collection
server: {
publicDirPrefix: "",
staticItems: ['assets'],
allowedEncodings: [ 'br', 'gzip' ],
spaFile: false,
notFoundPageFile: "/404.html",
autoExt: [],
autoIndex: ["index.html","index.htm"],
},
};
export default config;

View file

@ -1,12 +1,18 @@
/// <reference types="@fastly/js-compute" />
import { getServer } from '../static-publisher/statics.js';
const staticContentServer = getServer();
import { env } from 'fastly:env';
import { PublisherServer } from '@fastly/compute-js-static-publish';
import rc from '../static-publish.rc.js';
const publisherServer = PublisherServer.fromStaticPublishRc(rc);
// eslint-disable-next-line no-restricted-globals
addEventListener("fetch", (event) => event.respondWith(handleRequest(event)));
async function handleRequest(event) {
const response = await staticContentServer.serveRequest(event.request);
console.log('FASTLY_SERVICE_VERSION', env('FASTLY_SERVICE_VERSION'));
const request = event.request;
const response = await publisherServer.serveRequest(request);
if (response != null) {
return response;
}

View file

@ -1,34 +1,13 @@
/*
* Copyright Fastly, Inc.
* Licensed under the MIT license. See LICENSE file for details.
* Generated by @fastly/compute-js-static-publish.
*/
// Commented items are defaults, feel free to modify and experiment!
// See README for a detailed explanation of the configuration options.
/** @type {import('@fastly/compute-js-static-publish').StaticPublisherConfig} */
const config = {
rootDir: "../site",
staticContentRootDir: "./static-publisher",
// kvStoreName: false,
// excludeDirs: [ './node_modules' ],
// excludeDotFiles: true,
// includeWellKnown: true,
// contentAssetInclusionTest: (filename) => true,
// contentCompression: [ 'br', 'gzip' ], // For this config value, default is [] if kvStoreName is null.
// moduleAssetInclusionTest: (filename) => false,
// contentTypes: [
// { test: /.custom$/, contentType: 'application/x-custom', text: false },
// ],
server: {
publicDirPrefix: "",
staticItems: ["/assets/"],
// compression: [ 'br', 'gzip' ],
spaFile: false,
notFoundPageFile: "/404.html",
autoExt: [],
autoIndex: ["index.html","index.htm"],
},
/** @type {import('@fastly/compute-js-static-publish').StaticPublishRc} */
const rc = {
kvStoreName: "sig-security",
publishId: "default",
defaultCollectionName: "live",
staticPublisherWorkingDir: "./static-publisher",
};
export default config;
export default rc;