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

Manual Documentation Preview Action #84

Merged
merged 5 commits into from
Feb 5, 2025

Conversation

ssolson
Copy link
Contributor

@ssolson ssolson commented Feb 4, 2025

Once merged into main this will allow us to manually trigger a preview build of any docs PR to check that link ect are working correctly:

The preview will be available at:
https://mhkit-software.github.io/MHKiT/pr-previews/<PR#>/

Once merged into main to trigger the preview:

  1. Click Actions
  2. Click on "Manual Deploy PR Preview"
  3. Click run workflow
  4. Fill out the info
    image

@ssolson ssolson mentioned this pull request Feb 4, 2025
@ssolson ssolson changed the title Manual Preview Action Manual Documentation Preview Action Feb 4, 2025
@ssolson ssolson self-assigned this Feb 4, 2025
@ssolson ssolson requested a review from akeeste February 4, 2025 15:14
@ssolson
Copy link
Contributor Author

ssolson commented Feb 4, 2025

@akeeste hoping to merge this to test #82 allowing us to preview the live version.

I have already tested this on my fork and the example links in #82 are working.

@akeeste
Copy link
Contributor

akeeste commented Feb 4, 2025

Thanks @ssolson. Is there a way to automatically purge the PR-previews once the relevant PR is merged or closed? Maybe

  • another action that triggers when a PR is merged or closed, looks for a related preview and merges it
  • an extra step on the docs build for commits to main that removes previews (though this could close previews in progress)
  • or we could just manually commit to gh-pages once in awhile, removing the previews directory

@ssolson
Copy link
Contributor Author

ssolson commented Feb 4, 2025

@akeeste what previews directory are you talking about? Or I am not sure what your purge concern is here.

Previews are at:
https://mhkit-software.github.io/MHKiT/pr-previews/<PR#>/

Actual docs are on gh-pages branch viewable at:
https://mhkit-software.github.io/MHKiT/

@ssolson
Copy link
Contributor Author

ssolson commented Feb 4, 2025

Never mind I see your point now. Let me address that by adding a removal action.

Copy link
Contributor

@akeeste akeeste left a comment

Choose a reason for hiding this comment

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

Thanks @ssolson , looks good to merge

@ssolson
Copy link
Contributor Author

ssolson commented Feb 5, 2025

@akeeste I tried once more to make the preview builds auto trigger on a PR but there are security issues with allowing an outside contributor to trigger deployments so I went back to the manual deploy.

@akeeste
Copy link
Contributor

akeeste commented Feb 5, 2025

@akeeste I tried once more to make the preview builds auto trigger on a PR but there are security issues with allowing an outside contributor to trigger deployments so I went back to the manual deploy.

That makes sense. An automatic preview opens up the possibility for anything to appear on our documentation. The manually deployed preview will still be very helpful and seems pretty easy to trigger once implemented

@ssolson ssolson merged commit ed98b81 into MHKiT-Software:main Feb 5, 2025
1 check passed
github-actions bot pushed a commit that referenced this pull request Feb 5, 2025
* manual preview action

* delete all previews on merge or close
github-actions bot pushed a commit to ssolson/MHKiT that referenced this pull request Feb 5, 2025
* manual preview action

* delete all previews on merge or close
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