-
Notifications
You must be signed in to change notification settings - Fork 535
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
Deploy with GH Pages #820
Deploy with GH Pages #820
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/primer/primer-components/akz4lzv8s |
@@ -24,5 +24,5 @@ module.exports = { | |||
} | |||
} | |||
], | |||
pathPrefix: '/components' | |||
pathPrefix: `/components${process.env.STAGING_PATH_PREFIX || ''}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes it so that urls work with the weird staging deploy URLs
Closing this for now - I've written up some thoughts on why this doesn't feel like the best approach right now here: https://docs.google.com/document/d/1FImxLWEwKslz_Tu6s-3QXifSHqaX4_2UP2q9Gixb6gE/edit?usp=sharing Unfortunately I needed to discuss some confidential stuff in the doc so the sharing is set to only GH employees, if anyone has any questions though feel free to ask here and I will try to answer! 😄 |
Description
This PR moves our preview deploys from Now/vercel to GH Pages via an amazing action that I copypasta'd from @lerebear 's work! 🙌 🎉 Huge shoutout to Lere for coming up with these workflows!
I've also built an action for deploying our docs to the production url (https://primer.github.com/components). I tested it by changing the action to run on pushes to this branch and it worked smoothly and deployed here: https://primer.github.io/components (note that contributor data doesn't show up, but i fixed that in a later commit)
Notes
I needed to use a personal access token in the
request_deployment
workflows because jobs using theGITHUB_TOKEN
are prevented from triggering other workflows as Lere pointed out in his original PRRollout Plan
{"src": "/test-components(/.*)?", "dest": "https://primer.github.com/components"},
To do:
Contributions isn't working - I noticed in the deploy to production action that the script output thisfixed this just for production builds so we don't have to wait for all the API calls for each deploy preview. need to double check that it worked after merging to mastererror Non-deploy build and no GITHUB_TOKEN environment variable set; skipping GitHub API calls
. theGITHUB_TOKEN
environment variable should be set so I need to see if there's some way that this script classifies something as a deploy/non-deploy buildMigration Plan for Other Repos
name
,repo
,environment_url
indeploy-to-gh-pages.yml
name
,environment_url
, andrepo
indeploy-to-staging.yml
repo
anddescription
inrequest-staging-deployment.yml
pathPrefix
ingatsby-config.yml
Possible Improvements
if
parameters for each environment?