You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For small changes, you can deploy right to production by merging a pull request. For larger changes, push your branch to the staging repo from Terminal. Here's how to setup staging and deploy to it:
$ script/stage staging
This script will generate the government site (without starting the local server) and prep it for staging. It does this by creating a temporary Git repo within the compiled _site directory and force pushing that to a separate remote repo (in this case, https://ghe.io/government/staging).
Pushing to the staging repo requires authenticating with GitHub via Terminal. You'll be asked for a username and password when running script/stage. Use your GHE.io username and, since we enforce 2FA, use a personal access token as your password.
Having trouble deploying to a staging server? Delete the entire _site directory and try again. Sometimes the temporary Git repository we make in the script can go awry.
When you're done with staging and your pull request has been approved, you can merge your branch. Your changes will be automatically deployed to the production site in a few minutes.
The text was updated successfully, but these errors were encountered:
The below work from https://github.com/github/government.github.com should be helpful:
To Set up Locally
You can take all the files of this site and run them just on your computer as if it were live online, only it's just on your machine.
Requirements
If you have installed GitHub Desktop, Git was also installed automatically.
To copy the repository's files from here onto your computer and to view and serve those files locally, at your computer's command line type:
git clone https://github.com/github/government.github.com.git cd government.github.com script/bootstrap script/server
Open
http://localhost:4000
in your browserDeploying
government.github.com now utilizes a two-repo approach to managing staging and production deployments:
For small changes, you can deploy right to production by merging a pull request. For larger changes, push your branch to the staging repo from Terminal. Here's how to setup staging and deploy to it:
This script will generate the government site (without starting the local server) and prep it for staging. It does this by creating a temporary Git repo within the compiled
_site
directory and force pushing that to a separate remote repo (in this case, https://ghe.io/government/staging).Pushing to the staging repo requires authenticating with GitHub via Terminal. You'll be asked for a username and password when running
script/stage
. Use your GHE.io username and, since we enforce 2FA, use a personal access token as your password.Having trouble deploying to a staging server? Delete the entire
_site
directory and try again. Sometimes the temporary Git repository we make in the script can go awry.When you're done with staging and your pull request has been approved, you can merge your branch. Your changes will be automatically deployed to the production site in a few minutes.
The text was updated successfully, but these errors were encountered: