Skip to content

chore(ci): add pull request previews#888

Open
emersion wants to merge 2 commits intomainfrom
emr/pull-request-preview
Open

chore(ci): add pull request previews#888
emersion wants to merge 2 commits intomainfrom
emr/pull-request-preview

Conversation

@emersion
Copy link
Copy Markdown
Member

@mxmehl: would it be possible to add a new SSH key for NGE? I don't think we have a domain name for NGE yet though…

Copy link
Copy Markdown
Member

@mxmehl mxmehl left a comment

Choose a reason for hiding this comment

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

SSH key added. Please fix the preview subdir before running the next workflow.

@emersion emersion force-pushed the emr/pull-request-preview branch from 1839ae3 to 53cfe24 Compare March 23, 2026 12:43
@emersion
Copy link
Copy Markdown
Member Author

Many thanks!

It seems like we're failing SSH authentication, do you think it's something you can fix on your side @mxmehl?

drone-scp version: 1.8.0
tar all files into /tmp/OsUYtEwtuH.tar.gz
remote server os type is unix
scp file to server.
2026/03/23 12:47:28 error copy file to dest: uberspace1.openrailassociation.org, error message: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
drone-scp error:  error copy file to dest: uberspace1.openrailassociation.org, error message: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

@mxmehl
Copy link
Copy Markdown
Member

mxmehl commented Mar 24, 2026

Oh sorry, that was my fault. SSH key is now working, @emersion.

But the deployment does not work. As far as I can see, the workflow doesn't have the necessary permissions:

permissions:
  contents: read
  # pull-requests: write # for sticky_comment_enabled, which you don't use
  deployments: write # for gh_deployment

@emersion emersion force-pushed the emr/pull-request-preview branch from 53cfe24 to 3b85150 Compare March 24, 2026 10:27
@emersion
Copy link
Copy Markdown
Member Author

Aha, yes, seems like we've been investigating in parallel :P

I've kept packages: write because we'll want to restore NPM package publishing in the near future, and I don't think contents: read is actually required here. Let's see how this goes!

The default index.html contains this tag:

    <base href="/" />

This makes it so all resources are loaded relative to the root of
the Web server. This is required for proper navigation when NGE is
deployed with its backend. However, this prevents NGE to be
deployed in a sub-directory in standalone mode.

Create a separate index.html for use in standalone mode without the
<base> tag.

Unfortunately the filename needs to be exactly "index.html", otherwise
it won't have the correct name in the build directory. We have no
choice but to create a separate directory just for that file.

Signed-off-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Simon Ser <contact@emersion.fr>
@emersion
Copy link
Copy Markdown
Member Author

emersion commented Mar 24, 2026

Perfect, this now works as expected!

I've added a small additional commit to make it so NGE can be deployed in a subdir (see commit description for more details).

@emersion emersion marked this pull request as ready for review March 24, 2026 10:56
@emersion emersion requested a review from aiAdrian as a code owner March 24, 2026 10:56
@emersion emersion requested a review from mxmehl March 24, 2026 11:09
@emersion emersion moved this to Awaiting merge in Board PI 19 Mar 24, 2026
@emersion emersion self-assigned this Mar 24, 2026
Copy link
Copy Markdown
Contributor

@louisgreiner louisgreiner left a comment

Choose a reason for hiding this comment

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

This works so great, awesome!

@aiAdrian
Copy link
Copy Markdown
Contributor

I don't understand what this PR / change will do -> please give more information (call?)

@mxmehl
Copy link
Copy Markdown
Member

mxmehl commented Mar 30, 2026

Fine from the technical side for me.

I am open to support you with hosting the prod instance on an OpenRail webserver as well, but that'd probably best handled in a separate PR.

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

Labels

None yet

Projects

Status: Awaiting merge

Development

Successfully merging this pull request may close these issues.

4 participants