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

Make docs-build action work and push to the PR branch #257

Merged
merged 14 commits into from
Feb 22, 2021
Merged

Conversation

srt32
Copy link
Contributor

@srt32 srt32 commented Feb 19, 2021

Follow up to #252

The previous attempt was broken. To avoid branch protection rule errors on main, now we commit the changes to the current PR branch (on push). We can choose to make this build required once we're happy with it so devs can't forget to commit the docs and also can't write broken docs.

@vercel
Copy link

vercel bot commented Feb 19, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/primer/view-components/9LzkADDTNiGdXk3a4s8FC1FqBQCW
✅ Preview: https://view-components-git-srt32-patch-1-primer.vercel.app

@vercel vercel bot temporarily deployed to Preview February 19, 2021 16:44 Inactive
@srt32
Copy link
Contributor Author

srt32 commented Feb 19, 2021

Aha, protected branches are going to be a problem with this approach:


Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   Gemfile.lock

no changes added to commit (use "git add" and/or "git commit -a")
remote: error: GH006: Protected branch update failed for refs/heads/main.        
remote: error: 9 of 10 required status checks have not succeeded: 1 expected. At least 1 approving review is required by reviewers with write access.      

@srt32
Copy link
Contributor Author

srt32 commented Feb 19, 2021

We could build the docs on a different branch (docs, for example) and push there?

@srt32
Copy link
Contributor Author

srt32 commented Feb 19, 2021

cc/ @manuelpuyol for thoughts? ^

@manuelpuyol
Copy link
Contributor

Is it possible to commit to the branch that triggered the workflow? That way we could make it run on PRs instead of pushes on main

@srt32
Copy link
Contributor Author

srt32 commented Feb 19, 2021

Is it possible to commit to the branch that triggered the workflow? That way we could make it run on PRs instead of pushes on main

We could totally do this but it means devs will need to git pull before adding more commits, which might be fine but surprising. Let's start there!

implemented in b97c75c

@vercel vercel bot temporarily deployed to Preview February 19, 2021 17:33 Inactive
@vercel vercel bot temporarily deployed to Preview February 19, 2021 17:35 Inactive
@vercel vercel bot temporarily deployed to Preview February 19, 2021 17:44 Inactive
@vercel vercel bot temporarily deployed to Preview February 19, 2021 17:46 Inactive
@vercel vercel bot temporarily deployed to Preview February 19, 2021 17:50 Inactive
@vercel vercel bot temporarily deployed to Preview February 19, 2021 18:24 Inactive
@vercel vercel bot temporarily deployed to Preview February 19, 2021 18:26 Inactive
@srt32
Copy link
Contributor Author

srt32 commented Feb 19, 2021

It's alive!

image

@vercel vercel bot temporarily deployed to Preview February 19, 2021 18:27 Inactive
@srt32 srt32 changed the title Fix docs build yaml Make docs-build action work and push to the PR branch Feb 19, 2021
@vercel vercel bot temporarily deployed to Preview February 19, 2021 19:58 Inactive
@vercel vercel bot temporarily deployed to Preview February 19, 2021 20:00 Inactive
@srt32
Copy link
Contributor Author

srt32 commented Feb 19, 2021

@manuelpuyol ready for another 👁️

@vercel vercel bot temporarily deployed to Preview February 22, 2021 16:15 Inactive
@vercel vercel bot temporarily deployed to Preview February 22, 2021 16:17 Inactive
@srt32 srt32 merged commit c85460d into main Feb 22, 2021
@srt32 srt32 deleted the srt32-patch-1 branch February 22, 2021 16:26
This pull request was closed.
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.

3 participants