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

Create pull request comment when preview available #384

Open
vipulgupta2048 opened this issue Dec 10, 2022 · 4 comments
Open

Create pull request comment when preview available #384

vipulgupta2048 opened this issue Dec 10, 2022 · 4 comments
Assignees

Comments

@vipulgupta2048
Copy link
Member

To gain parity with GitHub actions on Handbook, we need to add a preview URL message to PR similar to balenaltd/handbook#52 (comment)

From: https://github.com/balenaltd/handbook/blob/main/.github/actions/publish/action.yml

    - name: Create pull request comment
      uses: marocchino/sticky-pull-request-comment@v2
      with:
        header: gh-preview
        GITHUB_TOKEN: ${{ fromJSON(inputs.secrets).FLOWZONE_TOKEN }}
        message: |
          :rocket: Deployed ${{ github.repository }}@${{ github.event.pull_request.head.sha }} to ${{ env.published_url }}

Also, investigate

  • Does Cloudflare have a limit on previews being created? Or are they going to be unlimited? If it is the latter then we won't need a way to clean our old GitHub previews.
@vipulgupta2048 vipulgupta2048 transferred this issue from product-os/docusaurus-builder Dec 10, 2022
@maggie44
Copy link

maggie44 commented Dec 13, 2022

For reference, I am not sure the preview URL in that PR you reference is working. It looks like it is building the docs without the changes in the PR. Maybe something we can explore for this new docs builder rather than digging around in the code which is going to be deprecated.

@vipulgupta2048
Copy link
Member Author

I referenced only the feature, we do need to build out our own implementation. Cloudflare Pages creates a unique URL every single time so we are covered on that point.

Good thing you told me @Maggie0002 This will unblock the PR I have pending for the handbook to convert with Docusarus builder.

@anujdeshpande
Copy link
Contributor

@vipulgupta2048 I think it might be a good idea in general to get some outputs from different flowzone steps in

  • PR comments
  • Summary of the action run

@klutchell
Copy link
Collaborator

An example of this being done for the handbook is here:
https://github.com/balenaltd/handbook/tree/50b6c0d9fef1a2a45138fb6869fa8e61103dec5e/.github/actions

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

No branches or pull requests

4 participants