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

feat: automate creating PRs to push content updates for iamdeveloper.com #61

Merged
merged 1 commit into from
Nov 6, 2022

Conversation

nickytonline
Copy link
Owner

@nickytonline nickytonline commented Nov 6, 2022

Description

Instead of pushing changes directly to main when updating blog posts or the streaming page for video content, a pull request (PR) is generated now that is auto-merged if any changes were committed.

This brings a few things with it:

  • Deploy previews on Netlify
  • Enforcing branch protection to require PRs
  • If there are issues and a check fails, the PR will not merge. Prior to this PR, if change were pushed, you'd only know if it failed on build during a build for production.

Here is an example post merge of this PR if you want to see it in action. #63

Issues & Related Documents

Closes #60

Post merge I wrote a blog post about all this. See Automate and Auto-Merge Pull Requests using GitHub Actions and the GitHub CLI

@netlify
Copy link

netlify bot commented Nov 6, 2022

Deploy Preview for iamdeveloperdotcom ready!

Name Link
🔨 Latest commit 4806943
🔍 Latest deploy log https://app.netlify.com/sites/iamdeveloperdotcom/deploys/6366ffbc39adc80008492f6b
😎 Deploy Preview https://deploy-preview-61--iamdeveloperdotcom.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

git commit -m "chore (automated): update blog posts"
git push origin main
fi
./bin/pr-blog-posts.sh
Copy link
Owner Author

Choose a reason for hiding this comment

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

It was easier to put this all in a script instead. Same for videos below. It could be one script and I pass in something to say video or blog post, but I'm keeping it simple for now and a little duplication isn't a biggie.

id: commit
- name: Setup git config
run: |
git config user.name 'token-generator-app[bot]'
Copy link
Owner Author

Choose a reason for hiding this comment

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

Required so that someone can be associated to the commit.

@nickytonline nickytonline merged commit 22a7282 into main Nov 6, 2022
@nickytonline nickytonline deleted the feat/automerge-content-prs branch November 6, 2022 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automate creating PRs to push content updates for iamdeveloper.com
1 participant