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

Website updates #5

Merged
merged 8 commits into from
Jul 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,11 @@ jobs:
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6

# Copy the files to the gh-pages branch
Copy link
Member

Choose a reason for hiding this comment

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

Should this really be executed for a PR? It would seem odd that each PR run updates what is displayed on the live website.
Also, as EisopSiteGenerator isn't executed, the templates and releases aren't updated.
So maybe this should go somewhere else?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure. The alternative is having to copy over the changes from the main branch to the gh-pages branch manually. This just saves a step before running EisopSiteGenerator on the gh-pages branch.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks! From the log it looks like this isn't working correctly. I've filed #11 for follow-up work.

- name: Copy To Branches Action
uses: planetoftheweb/[email protected]
env:
key: main
branches: gh-pages
files: afu-template.md cf-template.md CFLogo.png README.md index.md pom.xml 404.html src/main/java/io/github/eisop/website/EisopSiteGenerator.java
Binary file added CFLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/main/java/io/github/eisop/website/EisopSiteGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ public static void main(String[] args) throws IOException {
e.printStackTrace();
}

File releaseOrg = new File(String.valueOf(javadocFolder) + "/checker-javadoc/org");
FileUtils.copyDirectoryToDirectory(releaseOrg, javadocFolder);
Copy link
Member

Choose a reason for hiding this comment

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

Isn't it enough to move the directory over? Or why do we need two copies of the javadoc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we could just move the directory I believe


// Move index.html
// File releaseHTML = new File(String.valueOf(releaseFolder) +
// "/docs/tutorial/index.html");
Expand Down Expand Up @@ -305,6 +308,11 @@ public static void main(String[] args) throws IOException {

System.out.println("Latest release: " + String.valueOf(latestRelease));

// Copy CFLogo.png to cf/
File cfLogo = new File(String.valueOf(latestRelease) + "/tutorial/CFLogo.png");
wmdietl marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

Why does this PR need to add file CFLogo.png? Doesn't this take the existing logo from the latest release?
Or is that logo needed at https://eisop.github.io/?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I had initially wanted to upload the .png file, but decided it was better to take it from the latest release in case you want to change the logo at some point.
Will remove the file.

File newCFLogo = new File(System.getProperty("user.dir") + "/cf/CFLogo.png");
FileUtils.copyFile(cfLogo, newCFLogo);

getAFU();
}

Expand Down