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 site previews on Pull Request #13

Open
hacksburg-john opened this issue Jun 20, 2023 · 1 comment
Open

Add site previews on Pull Request #13

hacksburg-john opened this issue Jun 20, 2023 · 1 comment

Comments

@hacksburg-john
Copy link
Contributor

When making a PR (specifically updating the posts.json) generate the index.html and publish so that formatting and content can be checked.

Requirements:

  • Only publish home page, other pages change infrequently and this will speed up deployments and reduce size
    • Specifically want to avoid duplicating 360 tour (many relatively large images)

Proposed framework using github actions:

  1. On PR open, reopen, or synchronize with changes to posts.json
  2. Checkout the PR branch
  3. Run build script
  4. Commit built html file to master (rename to PR-.html)
    • Optionally commit to a separate "preview" repo to keep master clean
  5. Configure, upload, and deploy master to Github pages
  6. Add comment with link to the page preview on the PR
  7. On PR close, delete the preview file
@hacksburg-john
Copy link
Contributor Author

Findings so far:

  • Deploying the master branch from a dev branch takes additional effort. For initial prototyping, needed to manually trigger the master deployment script
  • With the master branch protected agains pushes, github actions cannot commit to master. Can that user be allowed to push? May allow anyone to define an action that pushes to master, defeating the point...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant