Skip to content

Fix support for .well-known and other routes with a leading .#88

Merged
delucis merged 7 commits intowithastro:mainfrom
SCdF:revert-upload-pages-artifact
Nov 19, 2025
Merged

Fix support for .well-known and other routes with a leading .#88
delucis merged 7 commits intowithastro:mainfrom
SCdF:revert-upload-pages-artifact

Conversation

@SCdF
Copy link
Copy Markdown
Contributor

@SCdF SCdF commented Nov 15, 2025

In 2226b56 upload-pages-artifact was updated to v4.

Unfortunately that version has a bug / bad feature, which blocks hidden files being added to the uploaded archive, which breaks .well-known. See: actions/upload-pages-artifact#129

You can see this by inspecting the archive generated by this action, and note that it won't contain hidden files.

This PR inlines the action that the upload pages artifact performs, but allows hidden files. This is the best we can do until github allows us to pass a parameter or similar.

Due to no longer supporting hidden files:
actions/upload-pages-artifact#129

Hidden files are required for `/.well-known`.
@delucis
Copy link
Copy Markdown
Member

delucis commented Nov 15, 2025

Ah, damn, I didn't consider .well-known, that's annoying.

One big motivation for us upgrading is that earlier versions of upload-pages-artifact didn't pin their own action dependencies meaning they don't work for people who require pinned versions in their repo or org settings. That means downgrading isn't really an option as we'd be breaking things for people.

Would you be interested in exploring what it would take to do this manually instead?

@SCdF SCdF marked this pull request as draft November 16, 2025 11:52
@SCdF
Copy link
Copy Markdown
Contributor Author

SCdF commented Nov 16, 2025

Ah. I like to live dangerously, I guess.

Probably the simplest thing is to just copy their action in line, and remove the offending part of the tar command that excludes hidden files.

The PR has been updated to do this. I've tested it personally (against uses: scdf/withastro_action@e6a71d13eca516bc74123f60e7957ae8b8bf6d5e)

If this if too much code I am happy staying on an older version, though you may wish to document the loss of .well-known somewhere.

Hopefully at some point GitHub will ship a parameter that allows you to (selectively?) hidden files, and this will no longer be necessary.

@SCdF SCdF marked this pull request as ready for review November 16, 2025 12:17
@SCdF SCdF changed the title Revert upload-pages-artifact Inline upload-pages-artifact Nov 18, 2025
Copy link
Copy Markdown
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

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

Thanks @SCdF! Would definitely be preferable to not have to maintain this, but I’m happy for us to take it on for now. Nice work on the clear explanatory comment in the workflow file.

We can watch actions/upload-pages-artifact#129 and hopefully be able to switch back to the official action at some point 🤞

@delucis delucis changed the title Inline upload-pages-artifact Fix support for .well-known and other routes with a leading . Nov 19, 2025
@delucis delucis merged commit 9811f92 into withastro:main Nov 19, 2025
@SCdF SCdF deleted the revert-upload-pages-artifact branch March 27, 2026 07:11
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