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

add archive HTML wikis, add index.html + css #7776

Merged
merged 8 commits into from
Nov 21, 2023

Conversation

pmario
Copy link
Member

@pmario pmario commented Oct 6, 2023

  • This PR should add the archive versions to the archive directory
  • It should create an index.html + static.css file in the archive dir

@Jermolene ... I do not know it works with your workflow of creating a new major release, because I do not know how you activate it. Please test if the files are created in the right directories.

@vercel
Copy link

vercel bot commented Oct 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
tiddlywiki5 ✅ Ready (Inspect) Visit Preview Nov 1, 2023 11:01pm

@Jermolene
Copy link
Member

Hi @pmario we use the ./bin/build-site.sh script both to build the root site and the copy in /prerelease. Ideally, we would not create /prerelease/archive etc. That's a bit awkward, I think it might require an additional parameter to the script...

@pmario
Copy link
Member Author

pmario commented Oct 7, 2023

I think it might require an additional parameter to the script...

As far as I can see, there are no parameters. There are only environment variables. IMO the important one to store the built content is TW5_BUILD_OUTPUT which points to the ./output directory.

So how do you change that when your create a release or prerelease

@Jermolene
Copy link
Member

As far as I can see, there are no parameters. There are only environment variables. IMO the important one to store the built content is TW5_BUILD_OUTPUT which points to the ./output directory.

So how do you change that when your create a release or prerelease

Apologies, we do indeed pass parameters via environment variables. The TW5_BUILD_OUTPUT variable is assigned within the GitHub actions script here.

The script could check the value of TW5_BUILD_OUTPUT to determine whether to build the archive index file, but I'd prefer to use a separate environment variable TW5_BUILD_ARCHIVE which accepts the relative path where the archive index file should be written.

@pmario pmario marked this pull request as draft November 1, 2023 10:05
@pmario pmario marked this pull request as ready for review November 1, 2023 11:08
@pmario
Copy link
Member Author

pmario commented Nov 1, 2023

@Jermolene ... This is ready for review and testing, since you do plan a new major version. It works locally on my ubuntu 22.04 system.

But I cannot test the CI version

bin/build-site.sh Outdated Show resolved Hide resolved
@pmario pmario marked this pull request as draft November 1, 2023 19:13
@pmario
Copy link
Member Author

pmario commented Nov 1, 2023

@Jermolene -- This is ready for review again. If TW_BUILD_ARCHIVE is set to ./output the archive will be created.

Since --build archive also contains a static index.html with the version overview the archive subdirectory needs to be configured within tiddlywiki.info. So TW_BUILD_ARCHIVE and TW_BUILD_OUTPUT need to be the same directory.

@Jermolene
Copy link
Member

Hi @pmario that seems a little confusing to have to keep the two parameters in sync like that. I was expecting TW_BUILD_ARCHIVE would just be a flag telling the script whether or not to build the archive.

@pmario
Copy link
Member Author

pmario commented Nov 2, 2023

@Jermolene -- ready for testing again. As you know, I cannot test the CI function. If you push the next update the prerelease should not create an archive version.

@Jermolene
Copy link
Member

Thank you @pmario and apologies for the delay.

@Jermolene Jermolene merged commit 37c6253 into TiddlyWiki:master Nov 21, 2023
4 checks passed
munnox pushed a commit to munnox/TiddlyWiki5 that referenced this pull request Dec 24, 2023
* add archive HTML wikis, add index.html + css

* only build archive for release version

* tested and add more docs

* fix indent

* fix spacing

* add $TW5_BUILD_OUTPUT_ARCHIVE env variable for testing

* use $TW5_BUILD_OUTPUT_ARCHIVE to check if archive should be built

* use TW5_BUILD_ARCHIVE as requested
@saqimtiaz
Copy link
Member

@pmario is this meant to be run via CI and to automatically update the archive? I do not see that an entry has been created for v5.3.2

@pmario
Copy link
Member Author

pmario commented Jan 4, 2024

@saqimtiaz Yes, It should create the archive automatically. -- But as I wrote in the OP I cannot test it, since the build process does not run with my repo.

IMO it can only be tested, if @Jermolene creates a new version, since the prerelease should not create an archive version

@Jermolene
Copy link
Member

Hi @pmario we've had two releases of new versions of TiddlyWiki since this PR was merged; wouldn't that have been enough to trigger your script?

@pmario
Copy link
Member Author

pmario commented Jan 5, 2024

..wouldn't that have been enough to trigger your script?

I do not have a GitHub CI bot. My setup and directory structure is completely different to yours. I have no idea, how to test the configuration with your settings.

@Jermolene
Copy link
Member

Hi @pmario as I understand it, this PR contains an update to our CI script to make it save the archive version. You weren't able to test it for reasons that I understand, but what I don't understand is that we've now got to the point where the script has been run many times, including two releases. That makes me think that we should now be in a position to (a) determine whether the modifications in this PR worked and (b) to fix them if not.

@pmario
Copy link
Member Author

pmario commented Jan 6, 2024

I found them: https://github.com/Jermolene/jermolene.github.io/tree/master/archive

The output path was wrong. I'll create a new PR soon.

The index.html works and should be updated once we update the TiddlyWiki Archive tiddler as a "docs only" update

@pmario pmario mentioned this pull request Jan 6, 2024
@pmario
Copy link
Member Author

pmario commented Jan 6, 2024

index.html and static.css need to stay in the archive directory as an index file.

@pmario pmario deleted the build-archive branch March 26, 2024 16:13
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