Update build script (#272)

* Copy dot files if present in the static folder, and add .circleci config to Docusaurus site

* Update docs
This commit is contained in:
Héctor Ramos 2017-12-11 16:32:05 -08:00 committed by Joel Marcey
parent c62e18eb53
commit 11029cf02d
3 changed files with 13 additions and 3 deletions

View file

@ -114,7 +114,7 @@ Now, whenever a new commit lands in `master`, CircleCI will run your suite of te
#### Tips & Tricks #### Tips & Tricks
When initially deploying to a `gh-pages` branch using Circle CI, you may notice that some jobs triggered by commits to the `gh-pages` branch fail to run successfully due to a lack of tests. You can easily work around this by creating a new file, `.circleci/config.yml`, in your `gh-pages` branch with the following contents: When initially deploying to a `gh-pages` branch using Circle CI, you may notice that some jobs triggered by commits to the `gh-pages` branch fail to run successfully due to a lack of tests. You can easily work around this by creating a basic Circle CI config with the following contents:
```yml ```yml
# Circle CI 2.0 Config File # Circle CI 2.0 Config File
@ -129,4 +129,4 @@ jobs:
-run: echo "Skipping tests on gh-pages branch" -run: echo "Skipping tests on gh-pages branch"
``` ```
Once you commit and push this file to your remote `gh-pages` branch on GitHub, Circle will skip running tests on the `gh-pages` branch. Save this file as `config.yml` and place it in a `.circleci` folder inside your `website/assets` folder.

View file

@ -365,7 +365,7 @@ function execute() {
}); });
// copy all static files from user // copy all static files from user
files = glob.sync(join(CWD, 'static', '**')); files = glob.sync(join(CWD, 'static', '**'), { dot: true});
files.forEach(file => { files.forEach(file => {
// parse css files to replace colors according to siteConfig // parse css files to replace colors according to siteConfig
if (file.match(/\.css$/) && !isSeparateCss(file)) { if (file.match(/\.css$/) && !isSeparateCss(file)) {

View file

@ -0,0 +1,10 @@
# Circle CI 2.0 Config File
# This config file will prevent tests from being run on the gh-pages branch.
version: 2
jobs:
build:
machine: true
branches:
ignore: gh-pages
steps:
-run: echo "Skipping tests on gh-pages branch"