Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish releases to GitHub Pages #4

Merged
merged 3 commits into from
Oct 25, 2024
Merged

Publish releases to GitHub Pages #4

merged 3 commits into from
Oct 25, 2024

Conversation

wjt
Copy link
Member

@wjt wjt commented Oct 24, 2024

While it is not necessarily useful to have this game in its default state
published to the web, this workflow can be used by a learner who has customised
the game in their own repo.

The workflow is designed to fail gracefully if GitHub Pages is not available
(which is typically the case in a private repo owned by a free account) or not
configured correctly.

It also only runs on releases or when manually triggered, to avoid running it
each time a learner pushes or merges to main.

The GitHub Actions workflow is intended to be useful to learners who have forked this game as
a basis for their own modified game. But rather than using an actual fork, they
will likely have downloaded the game from the asset library and committed it to
a fresh repository. So we include it in the version published to the asset library.

https://phabricator.endlessm.com/T35699

This preset is just the default settings for the Web target (as of
v4.3.stable.flathub [77dcf97d8], at least).

The important line is:

variant/thread_support=false

This selects a build of the Godot web runtime that does not use threads; and
hence does not use SharedArrayBuffer; and hence can be used on GitHub Pages
where the necessary headers to allow SharedArrayBuffer to be used cannot be
set.

https://phabricator.endlessm.com/T35699
While it is not necessarily useful to have this game in its default state
published to the web, this workflow can be used by a learner who has customised
the game in their own repo.

The workflow is designed to fail gracefully if GitHub Pages is not available
(which is typically the case in a private repo owned by a free account) or not
configured correctly.

It also only runs on releases or when manually triggered, to avoid running it
each time a learner pushes or merges to main.

https://phabricator.endlessm.com/T35699
This workflow is intended to be useful to learners who have forked this game as
a basis for their own modified game. But rather than using an actual fork, they
will likely have downloaded the game from the asset library and committed it to
a fresh repository.

https://phabricator.endlessm.com/T35699
Copy link
Contributor

@starnight starnight left a comment

Choose a reason for hiding this comment

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

Thanks

publish:
name: Publish to GitHub Pages
needs:
- build-web
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this mean need the build's artifact web?

Copy link
Member Author

Choose a reason for hiding this comment

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

It means it needs the build: job, defined above, to have run successfully.

(Logically, yes, that's because it needs to use the web artefact that that job uploads.)

Copy link
Member Author

Choose a reason for hiding this comment

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

Argh. I should have paid more attention to your question. There is a typo here: this should read:

Suggested change
- build-web
- build

@wjt wjt merged commit 3bfaf28 into main Oct 25, 2024
1 check passed
@wjt wjt deleted the T35699-gh-pages branch October 25, 2024 08:47
@cassidyjames
Copy link
Member

Can someone from @endlessm/endless-developers with admin access to the repo set the repo URL to https://endlessm.github.io/moddable-platformer/ to make this more discoverable, please?

@wjt
Copy link
Member Author

wjt commented Oct 25, 2024

Maybe the repo URL would be better as the assetlib entry. The web version of the game is not really the interesting part - the point is to get the game into Godot and hack it. We could adjust the readme and mention the web build there.

@cassidyjames
Copy link
Member

Yeah fair!

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.

3 participants