From 92da8b75935a934c1cb18b9a399ac808cd1535f4 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 a3da8809ec157bcbf149f82c29913d52d5364d70 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 530a5c24334a81b4de6bab688367c024be4b59b1 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 1b90235577f9b8123ee9f5daf945307360afc1cb 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 a20372f22496d35d5ef353e067878be4b96d1fc1 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 4c460309a7ed65f80a3c02c374b6910b4a7f453f 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 c81969204db4d4423856faa311b62f374c5988cc 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 847951b142a55e61ddbe9f42ef574888a4c57262 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 05852d38038606e1e36fc50d2515f69b2fb3524a 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 f3746e4047e1419a5a43cd2f01a79fa1187b4cdc 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 7faca4f360f3f3bcd338c57ec9737cf32e91c38d 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 05852d38038606e1e36fc50d2515f69b2fb3524a. --- .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 6dcc6ba697f75bac9ad851017a163481ff402c1b 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