Add dummy siteConfig.js for deploying, fixed indendation on publishing file (#285)

This commit is contained in:
Eric Nakagawa 2017-12-13 15:59:43 -08:00 committed by Joel Marcey
parent b47dae6ae1
commit fd835116ee
2 changed files with 28 additions and 26 deletions

View file

@ -74,25 +74,25 @@ Continuous integration (CI) services are typically used to perform routine tasks
If you're already using Circle CI for your project, all you need to do to enable automatic deployments is to configure Circle to run the `publish-gh-pages` script as part of the deployment step. If you're already using Circle CI for your project, all you need to do to enable automatic deployments is to configure Circle to run the `publish-gh-pages` script as part of the deployment step.
1. Ensure the GitHub account that will be set as the `GIT_USER` has `write` access to the repo that contains the documentation. 1. Ensure the GitHub account that will be set as the `GIT_USER` has `write` access to the repo that contains the documentation.
1. Log into GitHub as the `GIT_USER`. 1. Log into GitHub as the `GIT_USER`.
1. Go to https://github.com/settings/tokens for the `GIT_USER` and generate a new [personal access token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/), granting it full control of private repositories through the `repo` access scope. Store this token in a safe place, making sure to not share it with anyone. This token can be used to authenticate GitHub actions on your behalf in place of your GitHub password. 1. Go to https://github.com/settings/tokens for the `GIT_USER` and generate a new [personal access token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/), granting it full control of private repositories through the `repo` access scope. Store this token in a safe place, making sure to not share it with anyone. This token can be used to authenticate GitHub actions on your behalf in place of your GitHub password.
1. Open your Circle CI dashboard, and navigate to the Settings page for your repository, then select "Environment variables". The URL looks like https://circleci.com/gh/ORG/REPO/edit#env-vars, where "ORG/REPO" should be replaced with your own GitHub org/repo. 1. Open your Circle CI dashboard, and navigate to the Settings page for your repository, then select "Environment variables". The URL looks like https://circleci.com/gh/ORG/REPO/edit#env-vars, where "ORG/REPO" should be replaced with your own GitHub org/repo.
1. Create a new environment variable named "GITHUB_TOKEN", using your newly generated access token as the value. 1. Create a new environment variable named "GITHUB_TOKEN", using your newly generated access token as the value.
1. Open your `circle.yml` file and add the following under the `machine:` section to tell Circle to use relatively recent versions of node and npm, replacing npm with yarn if applicable: 1. Open your `circle.yml` file and add the following under the `machine:` section to tell Circle to use relatively recent versions of node and npm, replacing npm with yarn if applicable:
``` ```
machine: machine:
node: node:
version: 6.11.2 version: 6.11.2
npm: npm:
version: 3.10.10 version: 3.10.10
``` ```
1. Then, add the following lines to the `deployment:` section. If you don't have a `deployment:` section, you can add it at the end of the file. 1. Then, add the following lines to the `deployment:` section. If you don't have a `deployment:` section, you can add it at the end of the file.
``` ```
deployment: deployment:
website: website:
branch: master branch: master
commands: commands:
@ -100,7 +100,7 @@ If you're already using Circle CI for your project, all you need to do to enable
- git config --global user.name "<YOUR_NAME>" - git config --global user.name "<YOUR_NAME>"
- echo "machine github.com login <GITHUB_USERNAME> password $GITHUB_TOKEN" > ~/.netrc - echo "machine github.com login <GITHUB_USERNAME> password $GITHUB_TOKEN" > ~/.netrc
- cd website && npm install && GIT_USER=<GIT_USER> npm run publish-gh-pages - cd website && npm install && GIT_USER=<GIT_USER> npm run publish-gh-pages
``` ```
Make sure to replace `<GIT_USER>` with the actual username of the GitHub account that will be used to publish the documentation. Make sure to replace `<GIT_USER>` with the actual username of the GitHub account that will be used to publish the documentation.

View file

@ -42,6 +42,8 @@ const siteConfig = {
'Copyright © ' + 'Copyright © ' +
new Date().getFullYear() + new Date().getFullYear() +
' Your Name or Your Company Name', ' Your Name or Your Company Name',
// organizationName: 'deltice', // or set an env variable ORGANIZATION_NAME
// projectName: 'test-site', // or set an env variable PROJECT_NAME
highlight: { highlight: {
// Highlight.js theme to use for syntax highlighting in code blocks // Highlight.js theme to use for syntax highlighting in code blocks
theme: 'default', theme: 'default',