Browse Source

Merge pull request #3 from Anatole-DC/netlify_doc

Netlify doc
pull/4/head
Anatole De Chauveron 4 years ago
committed by GitHub
parent
commit
9be578b5e7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 41
      .circleci/config.yml
  2. 4
      .gitignore
  3. 21
      netlify.toml

41
.circleci/config.yml

@ -71,6 +71,38 @@ jobs:
exit 1
fi
server-doc-build:
<<: *shared-config
steps:
- checkout
- restore_cache:
key: dependencies-{{ checksum "package.json" }}-v1
- run: yarn doc:build
- run:
name: Copy deployment artifacts to workspace
command: |
cp docs/ /tmp/server-doc -r
- store_artifacts:
path: /tmp/server-doc
- persist_to_workspace:
root: /tmp
paths:
- server-doc
server-doc-deploy:
<<: *shared-config
working_directory: ~/deploy-doc-server
steps:
- attach_workspace:
at: /tmp
- run:
name: Install netlify
command: |
yarn add -D netlify-cli
- run:
name: Deploy app
command: yarn netlify deploy --auth $NETLIFY_AUTH_TOKEN --dir /tmp/server-doc --site $NETLIFY_SITE_ID --prod
workflows:
version: 2
build-test-and-lint:
@ -91,6 +123,15 @@ workflows:
- lint
- back-test-unit
- back-test-e2e
filters:
branches:
only: main
- server-doc-build:
requires:
- build
- lint
- back-test-e2e
- back-test-unit
filters:
branches:
only: main

4
.gitignore

@ -34,4 +34,6 @@ lerna-debug.log*
!.vscode/launch.json
!.vscode/extensions.json
.env
docs/
docs/
# Local Netlify folder
.netlify

21
netlify.toml

@ -0,0 +1,21 @@
# example netlify.toml
[build]
command = "yarn run build"
functions = "netlify/functions"
publish = "."
## Uncomment to use this redirect for Single Page Applications like create-react-app.
## Not needed for static site generators.
#[[redirects]]
# from = "/*"
# to = "/index.html"
# status = 200
## (optional) Settings for Netlify Dev
## https://github.com/netlify/cli/blob/main/docs/netlify-dev.md#project-detection
#[dev]
# command = "yarn start" # Command to start your dev server
# port = 3000 # Port that the dev server will be listening on
# publish = "dist" # Folder with the static content for _redirect file
## more info on configuring this file: https://www.netlify.com/docs/netlify-toml-reference/
Loading…
Cancel
Save