diff --git a/docs/en/next/publishing.html b/docs/en/next/publishing.html index 63ac78bfba..c4b63de3b6 100644 --- a/docs/en/next/publishing.html +++ b/docs/en/next/publishing.html @@ -298,6 +298,43 @@ - cd website && yarn install && GIT_USER="${GH_NAME}" yarn run publish-gh-pages
Now, whenever a new commit lands in master
, Travis CI will run your suite of tests and, if everything passes, your website will be deployed via the publish-gh-pages
script.
GH_TOKEN
with your newly generated token as its value, then GH_EMAIL
(your email address) and GH_NAME
(your GitHub username). Make sure to mark them as secret. Alternatively, you can also add a file named azure-pipelines.yml
at yout repository root.# azure-pipelines.yml
+trigger:
+- master
+
+pool:
+ vmImage: 'ubuntu-latest'
+
+steps:
+- checkout: self
+ persistCredentials: true
+
+- task: NodeTool@0
+ inputs:
+ versionSpec: '10.x'
+ displayName: 'Install Node.js'
+
+- script: |
+ git config --global user.name "${GH_NAME}"
+ git config --global user.email "${GH_EMAIL}"
+ git checkout -b master
+ echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc
+ cd website
+ yarn install
+ GIT_USER="${GH_NAME}" CURRENT_BRANCH=master yarn run publish-gh-pages
+ env:
+ GH_NAME: $(GH_NAME)
+ GH_EMAIL: $(GH_EMAIL)
+ GH_TOKEN: $(GH_TOKEN)
+ displayName: 'yarn install and build'
+
With ZEIT Now, you can deploy your site and connect it to GitHub or GitLab to automatically receive a new deployment every time you push a commit.
Alter your siteConfig.js
to add a property 'githubHost'
which represents the GitHub Enterprise hostname. Alternatively, set an environment variable GITHUB_HOST
when executing the publish command.