mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-11 16:17:25 +02:00
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:
parent
c62e18eb53
commit
11029cf02d
3 changed files with 13 additions and 3 deletions
|
@ -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.
|
|
@ -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)) {
|
||||||
|
|
10
website/static/.circleci/config.yml
Normal file
10
website/static/.circleci/config.yml
Normal 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"
|
Loading…
Add table
Add a link
Reference in a new issue