Skip to content

feat: add local GitHub Pages dev support #36

Open
dsimansk wants to merge 1 commit into
functions-dev:masterfrom
dsimansk:pr/page-cmd
Open

feat: add local GitHub Pages dev support #36
dsimansk wants to merge 1 commit into
functions-dev:masterfrom
dsimansk:pr/page-cmd

Conversation

@dsimansk

Copy link
Copy Markdown
Collaborator

Changes

  • Add local page cmd to view

GitHub Pages local development - fetch('plugin.yaml') always fails locally because plugin.yaml is only generated by the CI workflow (helm template). Add a way to test the GitHub Pages site locally (e.g. a script that generates plugin.yaml into the pages directory, or a local dev server setup).

@matejvasek @twoGiants is this somewhat coming closer to the idea stated above?

@matejvasek matejvasek requested a review from twoGiants June 10, 2026 16:58
@dsimansk

Copy link
Copy Markdown
Collaborator Author

After spending some time with local dev setup on CRC, I'm rethinking the very simple approach of separate command. I see it needs to be properly wired into local dev loop.

@dsimansk dsimansk changed the title Add local page cmd to view Add local dev command to run backend and plugin Jun 11, 2026

@twoGiants twoGiants left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, going into the right direction! I'd just move it to the init script. See my comments below.

Comment thread hack/dev.sh Outdated
Comment thread README.md Outdated
@@ -55,7 +55,9 @@ Available image tags are listed in the [container registry](https://github.com/f
In one terminal window, run:

@twoGiants twoGiants Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the entire Option 1 (rename to Setup) section to say that init.sh should be used to start the dev env?

A few more things:

  • Remove the sections:
    • #### Running start-console with Apple silicon and podman
    • Option 2: ...
  • Add a small section in the Readme telling how to view the github pages locally.
  • Add go and helm to the prerequisites.
  • You could make the plugin.yaml generation optional in the init.sh script, then go and helm will also be optional.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@twoGiants I've updated the readme, but it's a bit of overhaul. Could you pls check if it make sense to you.

I'd still wrap ./init.sh into some yarn alias like yarn dev, wdyt?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Readme looks great! Thank you for the update.

I'd leave it because we have also init --stop|--randomize-ports or the init usage will be fragmented.

Comment thread .gitignore Outdated
Comment thread .gitignore Outdated
@dsimansk dsimansk changed the title Add local dev command to run backend and plugin feat: add local GitHub Pages dev support Jun 15, 2026
init.sh now generates plugin.yaml (via helm template)
and copies pages/index.html into backend/static/ so
the running Go backend serves the landing page locally.

Also adds helm prerequisite check, extracts PLUGIN_NAME
variable, simplifies README dev setup docs, and adds
CRC host mapping for macOS containers.

Co-Authored-By: Claude <noreply@anthropic.com>

@twoGiants twoGiants left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few minor remarks. Merge once they are fixed.

Good work! 👍

Comment thread init.sh
exit 1
fi

if ! command -v helm &>/dev/null; then

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the check into build_pages.

Comment thread init.sh
set -euo pipefail

LOG_DIR=".dev-logs"
PLUGIN_NAME="console-functions-plugin"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a local variable in build_pages, it's only used there.

Comment thread docs/features.json
"Add pages/plugin.yaml to .gitignore so the generated file is not committed",
"Document usage in README or script header"
],
"passes": false

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be true if done -> update claude progress with that before merge.

Comment thread README.md Outdated
@@ -55,7 +55,9 @@ Available image tags are listed in the [container registry](https://github.com/f
In one terminal window, run:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Readme looks great! Thank you for the update.

I'd leave it because we have also init --stop|--randomize-ports or the init usage will be fragmented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants