From 49150ccf97f8f2a1b9b2094cd8545c908ef54059 Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Sun, 21 Jan 2024 12:52:45 -0600 Subject: [PATCH 01/12] don't explicitly set baseurl, let it come from hugo configs --- .github/workflows/deploy-to-neocities.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/deploy-to-neocities.yml b/.github/workflows/deploy-to-neocities.yml index a03385c..ac8e84a 100644 --- a/.github/workflows/deploy-to-neocities.yml +++ b/.github/workflows/deploy-to-neocities.yml @@ -40,8 +40,7 @@ jobs: HUGO_ENV: production run: | hugo \ - --minify \ - --baseURL "https://runtimeterror.dev/" + --minify - name: Highlight with Torchlight run: | npm i @torchlight-api/torchlight-cli From 0d3aba0607c0b744c9e3be2c3076901940ec5218 Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Sun, 21 Jan 2024 13:04:00 -0600 Subject: [PATCH 02/12] remove netlify config --- config/preview/hugo.toml | 1 - config/preview/params.toml | 2 -- netlify.toml | 39 -------------------------------------- 3 files changed, 42 deletions(-) delete mode 100644 config/preview/hugo.toml delete mode 100644 config/preview/params.toml delete mode 100644 netlify.toml diff --git a/config/preview/hugo.toml b/config/preview/hugo.toml deleted file mode 100644 index 7dc856f..0000000 --- a/config/preview/hugo.toml +++ /dev/null @@ -1 +0,0 @@ -baseURL = "https://preview--runtimeterrordev.netlify.app" \ No newline at end of file diff --git a/config/preview/params.toml b/config/preview/params.toml deleted file mode 100644 index c8a1743..0000000 --- a/config/preview/params.toml +++ /dev/null @@ -1,2 +0,0 @@ -comments = false -analytics = false \ No newline at end of file diff --git a/netlify.toml b/netlify.toml deleted file mode 100644 index d62d2ed..0000000 --- a/netlify.toml +++ /dev/null @@ -1,39 +0,0 @@ -[build] - publish = "public" - -[build.environment] - HUGO_VERSION = "0.121.1" - -[context.production] - command = """ - hugo - npm i @torchlight-api/torchlight-cli - npx torchlight - """ - -[context.preview] - command = """ - hugo --environment preview - npm i @torchlight-api/torchlight-cli - npx torchlight - """ - [[headers]] - for = "/*" - [headers.values] - X-Robots-Tag = "noindex" - -[context.drafts] - command = """ - hugo --environment drafts -D - npm i @torchlight-api/torchlight-cli - npx torchlight - """ - [[headers]] - for = "/*" - [headers.values] - X-Robots-Tag = "noindex" - -[[redirects]] - from = "/*" - to = "/404/" - status = 404 \ No newline at end of file From 7f02efaae87a68bb73d50bf248dfe6f6ed8afbdd Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Sun, 21 Jan 2024 13:04:17 -0600 Subject: [PATCH 03/12] fix case in workflow title --- .github/workflows/deploy-to-neocities.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-to-neocities.yml b/.github/workflows/deploy-to-neocities.yml index ac8e84a..5af202d 100644 --- a/.github/workflows/deploy-to-neocities.yml +++ b/.github/workflows/deploy-to-neocities.yml @@ -1,4 +1,4 @@ -name: Deploy to neocities +name: Deploy to Neocities # only run on changes to main on: From b3bfe64a658178a6d894aff4120a8c75a4aa650c Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Sun, 21 Jan 2024 13:04:43 -0600 Subject: [PATCH 04/12] create not_found.html for neocities --- .github/workflows/deploy-to-neocities.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/deploy-to-neocities.yml b/.github/workflows/deploy-to-neocities.yml index 5af202d..a125563 100644 --- a/.github/workflows/deploy-to-neocities.yml +++ b/.github/workflows/deploy-to-neocities.yml @@ -41,6 +41,9 @@ jobs: run: | hugo \ --minify + - name: Insert 404 page + run: | + cp public/not_found/index.html public/not_found.html - name: Highlight with Torchlight run: | npm i @torchlight-api/torchlight-cli From d1c38bf0ad9cff27852af6c0b20c95b07b6c656e Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Sun, 21 Jan 2024 13:05:49 -0600 Subject: [PATCH 05/12] update status badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b161252..7b94f26 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -[![Netlify Status](https://api.netlify.com/api/v1/badges/7cd6b595-2b3b-403d-a29f-c4f27e8bd366/deploy-status)](https://app.netlify.com/sites/runtimeterrordev/deploys) \ No newline at end of file +[![Neocities Deployment Status](https://github.com/jbowdre/runtimeterror/actions/workflows/deploy-to-neocities.yml/badge.svg)](https://github.com/jbowdre/runtimeterror/actions/workflows/deploy-to-neocities.yml) \ No newline at end of file From cc3d735500ca24168381ae1fe1afcd11f2331ec0 Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Sun, 21 Jan 2024 13:23:28 -0600 Subject: [PATCH 06/12] split workflow into multiple jobs --- .github/workflows/deploy-to-neocities.yml | 37 ++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-to-neocities.yml b/.github/workflows/deploy-to-neocities.yml index a125563..a42b5b0 100644 --- a/.github/workflows/deploy-to-neocities.yml +++ b/.github/workflows/deploy-to-neocities.yml @@ -16,7 +16,8 @@ defaults: shell: bash jobs: - deploy: + build: + name: Build Hugo site runs-on: ubuntu-latest env: HUGO_VERSION: "0.121.1" @@ -44,10 +45,44 @@ jobs: - name: Insert 404 page run: | cp public/not_found/index.html public/not_found.html + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: public + path: public + retention-days: 1 + + highlight: + name: Highlight code with Torchlight + runs-on: ubuntu-latest + needs: build + steps: + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: public + path: public - name: Highlight with Torchlight run: | npm i @torchlight-api/torchlight-cli npx torchlight + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: public + path: public + retention-days: 1 + + deploy: + name: Publish to Neocities + runs-on: ubuntu-latest + needs: highlight + steps: + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: public + path: public - name: Deploy to neocities uses: bcomnes/deploy-to-neocities@v1 with: From 813e70a45f016c2f657a6a9ec626ee429410a21d Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Sun, 21 Jan 2024 14:24:17 -0600 Subject: [PATCH 07/12] hotfix: remove regex that was breaking the highlighter --- .../run-scripts-in-guest-os-with-vra-abx-actions/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/posts/run-scripts-in-guest-os-with-vra-abx-actions/index.md b/content/posts/run-scripts-in-guest-os-with-vra-abx-actions/index.md index b48fef3..198d9a6 100644 --- a/content/posts/run-scripts-in-guest-os-with-vra-abx-actions/index.md +++ b/content/posts/run-scripts-in-guest-os-with-vra-abx-actions/index.md @@ -97,6 +97,7 @@ resources: And I will add in a `storage` property as well which will automatically adjust the deployed VMDK size to match the specified input: ```yaml +# torchlight! {"torchlightAnnotations": false} # torchlight! {"lineNumbers": true} [...] description: '${input.description}' @@ -202,7 +203,6 @@ inputs: type: string title: Point of Contact Email default: jack.shephard@example.com - pattern: '^[^\s@]+@[^\s@]+\.[^\s@]+$' ticket: type: string title: Ticket/Request Number @@ -292,7 +292,7 @@ Once all those constants are created I can move on to the meat of this little pr #### ABX Action I'll click back to **Extensibility > Library > Actions** and then **+ New Action**. I give the new action a clever title and description: -![Create a new action](20210901_create_action.png)] +![Create a new action](20210901_create_action.png) I then hit the language dropdown near the top left and select to use `powershell` so that I can use those sweet, sweet PowerCLI cmdlets. ![Language selection](20210901_action_select_language.png) From f1f588c659de91021080515c405d770a69f889dd Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Sun, 21 Jan 2024 14:24:47 -0600 Subject: [PATCH 08/12] don't show comments on local renders --- config/local/params.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/local/params.toml b/config/local/params.toml index 3b5ce10..c8a1743 100644 --- a/config/local/params.toml +++ b/config/local/params.toml @@ -1,2 +1,2 @@ -comments = true +comments = false analytics = false \ No newline at end of file From 3f2d383ac3a6a8cb21de9a84f11cfce6939808b6 Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Sun, 21 Jan 2024 14:25:58 -0600 Subject: [PATCH 09/12] use cache for torchlight runs --- .gitignore | 1 + torchlight.config.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d5f97c8..45e31c9 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ /public/ /resources/ /.env* +/.torchlight-cache diff --git a/torchlight.config.js b/torchlight.config.js index abdbd00..3f1b8e8 100644 --- a/torchlight.config.js +++ b/torchlight.config.js @@ -7,7 +7,7 @@ module.exports = { // want to add this directory to your .gitignore. Set to // `false` to use an in-memory cache. You may also // provide a full cache implementation. - cache: false, + cache: '.torchlight-cache', // Which theme you want to use. You can find all of the themes at // https://torchlight.dev/docs/themes. From 708210d76d2f6e588282a4fe2450fb76f6c84a54 Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Sun, 21 Jan 2024 14:32:08 -0600 Subject: [PATCH 10/12] perform checkout and node dependencies in highlight job --- .github/workflows/deploy-to-neocities.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/deploy-to-neocities.yml b/.github/workflows/deploy-to-neocities.yml index a42b5b0..2a0d1cb 100644 --- a/.github/workflows/deploy-to-neocities.yml +++ b/.github/workflows/deploy-to-neocities.yml @@ -57,6 +57,12 @@ jobs: runs-on: ubuntu-latest needs: build steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + - name: Install Node.js dependencies + run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" - name: Download artifact uses: actions/download-artifact@v4 with: From b4975674607f8aff8dc81d60d072eef2b0f04d09 Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Sun, 21 Jan 2024 14:32:20 -0600 Subject: [PATCH 11/12] Revert "use cache for torchlight runs" This reverts commit 3f2d383ac3a6a8cb21de9a84f11cfce6939808b6. --- .gitignore | 1 - torchlight.config.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 45e31c9..d5f97c8 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,4 @@ /public/ /resources/ /.env* -/.torchlight-cache diff --git a/torchlight.config.js b/torchlight.config.js index 3f1b8e8..abdbd00 100644 --- a/torchlight.config.js +++ b/torchlight.config.js @@ -7,7 +7,7 @@ module.exports = { // want to add this directory to your .gitignore. Set to // `false` to use an in-memory cache. You may also // provide a full cache implementation. - cache: '.torchlight-cache', + cache: false, // Which theme you want to use. You can find all of the themes at // https://torchlight.dev/docs/themes. From b281e212f7a4f28cb11980badbd50c7602d74a65 Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Sun, 21 Jan 2024 14:36:57 -0600 Subject: [PATCH 12/12] use unique artifact names --- .github/workflows/deploy-to-neocities.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-to-neocities.yml b/.github/workflows/deploy-to-neocities.yml index 2a0d1cb..e06ea3d 100644 --- a/.github/workflows/deploy-to-neocities.yml +++ b/.github/workflows/deploy-to-neocities.yml @@ -48,7 +48,7 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v4 with: - name: public + name: build path: public retention-days: 1 @@ -66,7 +66,7 @@ jobs: - name: Download artifact uses: actions/download-artifact@v4 with: - name: public + name: build path: public - name: Highlight with Torchlight run: | @@ -75,7 +75,7 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v4 with: - name: public + name: highlight path: public retention-days: 1 @@ -87,7 +87,7 @@ jobs: - name: Download artifact uses: actions/download-artifact@v4 with: - name: public + name: highlight path: public - name: Deploy to neocities uses: bcomnes/deploy-to-neocities@v1