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

chore: add preview link for docs changes #2578

Closed

Conversation

mvares
Copy link
Contributor

@mvares mvares commented Jun 21, 2024

Summary

This PR provides a preview link for pull requests that change the docs. That offers several benefits as:

  • A draft view of the documentation changes included in the PR
  • An automatically deployed version using GitHub Pages

Breaking Changes

This actions needs at least:

permissions: 
   pull-requests: write 

@arboleya arboleya added docs Requests pertinent to documentation chore Issue is a chore labels Jun 22, 2024
@arboleya arboleya added this to the 0.x mainnet milestone Jun 22, 2024
@mvares
Copy link
Contributor Author

mvares commented Jun 22, 2024

Before merging the PR, someone must grant some permissions to the repository related to Github Pages .

Copy link
Member

@arboleya arboleya left a comment

Choose a reason for hiding this comment

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

We should also post the preview link as a comment on the PR.

Here's one example of how coverage report does it:

  • - name: Report Coverage
    uses: thollander/actions-comment-pull-request@v2
    if: ${{ steps.findPr.outputs.number }}
    with:
    filePath: coverage/report/coverage-diff.txt
    pr_number: ${{ (steps.findPr.outputs.number) }}
    comment_tag: diff
    mode: recreate
    create_if_not_exists: true

Copy link
Contributor

@petertonysmith94 petertonysmith94 left a comment

Choose a reason for hiding this comment

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

Will this override our existing GitHub pages deployment?
https://fuellabs.github.io/fuels-ts/

.github/workflows/docs-preview.yaml Show resolved Hide resolved
.github/workflows/docs-preview.yaml Show resolved Hide resolved
Copy link
Contributor

@danielbate danielbate left a comment

Choose a reason for hiding this comment

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

Great work, couple comments

.github/workflows/docs-preview.yaml Outdated Show resolved Hide resolved
.github/workflows/docs-preview.yaml Outdated Show resolved Hide resolved
.github/workflows/docs-preview.yaml Outdated Show resolved Hide resolved
.github/workflows/docs-preview.yaml Outdated Show resolved Hide resolved
danielbate and others added 4 commits June 24, 2024 08:51
Co-authored-by: Peter Smith <peter@blueoceancomputing.co.uk>
Co-authored-by: Peter Smith <peter@blueoceancomputing.co.uk>
Co-authored-by: Daniel Bate <djbate23@gmail.com>
@mvares
Copy link
Contributor Author

mvares commented Jun 24, 2024

Will this override our existing GitHub pages deployment? https://fuellabs.github.io/fuels-ts/

Probably yes, but we can see some way to create pages based on PR number or contributor name. (It's something we can analyze)

Get a look at this.

.github/workflows/docs-preview.yaml Outdated Show resolved Hide resolved
.github/workflows/docs-preview.yaml Outdated Show resolved Hide resolved
@petertonysmith94
Copy link
Contributor

@petertonysmith94
Will this override our existing GitHub pages deployment? https://fuellabs.github.io/fuels-ts/

@mvares
Probably yes, but we can see some way to create pages based on PR number or contributor name. (It's something we can analyze)

Get a look at this.

It looks like currently GH pages doesn't support preview deployment and from the discussion, it doesn't look remotely close.

I have hesitations about deploying to our primary GH page, and potentially deploying to Vercel is a better approach. What are other peoples thoughts?

cc: @FuelLabs/sdk-ts

mvares and others added 2 commits June 24, 2024 23:47
@mvares
Copy link
Contributor Author

mvares commented Jun 25, 2024

It looks like currently GH pages doesn't support preview deployment and from the discussion, it doesn't look remotely close.

I have hesitations about deploying to our primary GH page, and potentially deploying to Vercel is a better approach. What are other peoples thoughts?

cc: @FuelLabs/sdk-ts

I agree with you. Maybe it may be interesting to try something with Vercel (By the way, vercel already has a pre-deployment feature)

@Torres-ssf
Copy link
Contributor

It looks like currently GH pages doesn't support preview deployment and from the discussion, it doesn't look remotely close.

I have hesitations about deploying to our primary GH page, and potentially deploying to Vercel is a better approach. What are other peoples thoughts?

cc: @FuelLabs/sdk-ts

@petertonysmith94 Agreed. We should use a different strategy here. Vercel seems to be a good suggestion.

@mvares
Copy link
Contributor Author

mvares commented Jun 25, 2024

@petertonysmith94 Agreed. We should use a different strategy here. Vercel seems to be a good suggestion.

@Torres-ssf, considering that we are likely already planning a different strategy here, I think this PR is now beyond their scope. Should this PR be closed?

@petertonysmith94 petertonysmith94 marked this pull request as draft June 26, 2024 09:19
@petertonysmith94
Copy link
Contributor

petertonysmith94 commented Jun 26, 2024

@mvares I've converted it to a draft for the time being.

We can close once we know it's not needed.
Pretty sure this won't be needed so closing - I've added a comment summarising this in the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Issue is a chore docs Requests pertinent to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add preview link for PRs that change docs (using vitepress)
5 participants