Skip to content

Conversation

@jonrohan
Copy link
Member

@jonrohan jonrohan commented Apr 5, 2021

closes #1301

This PR disables the vercel-bot auto deployment and uses this vercel action instead https://github.com/marketplace/actions/vercel-action

The reasoning behind this is more control on when we deploy. Here's the new logic:

  • Preview deploys Preview deploys deploy to preview vercel urls whenever a push happens on any branch except main and touches src/**, docs/**, package.json files. This helps cleans up the auto deploys on PRs and only deploys when the pr changes something that effects the output of the site.
  • Production deploys Production deploys deploy to primer.style/css whenever a push happens only on the main branch and touches src/**, docs/**, package.json files. The workflow also checks the changesets to see if this is a new version release or if there's a release being worked on. When there's currently a release being worked on and hasn't been published yet, the script doesn't deploy.

@changeset-bot
Copy link

changeset-bot bot commented Apr 5, 2021

⚠️ No Changeset found

Latest commit: 22957e2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@jonrohan jonrohan changed the title Testing out vercel deploy action instead of vercel bot Deploying the primer.style website with a github action instead of vercel-bot Apr 6, 2021
@jonrohan jonrohan marked this pull request as ready for review April 6, 2021 01:49
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-token: ${{ secrets.VERCEL_TOKEN_SHARED }}
github-comment: false
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason we don't want vercel to make a github comment?

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought it was extra noise we didn't really need since there's deployment statuses in the PR also. but that's my personal preference, I'm open to others thoughts. We also have the option to put custom content in here.

Copy link
Contributor

@colebemis colebemis left a comment

Choose a reason for hiding this comment

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

👍 LGTM. Let's try it out and see if it works 🤞

@jonrohan jonrohan merged commit fae9af2 into main Apr 6, 2021
@jonrohan jonrohan deleted the vercel_action branch April 6, 2021 17:24
@jonrohan
Copy link
Member Author

jonrohan commented Apr 6, 2021

🤞🏻

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.

Use vercel action for deployments instead of vercel bot

3 participants