diff --git a/.circleci/config.yml b/.circleci/config.yml index c821215..d8efaf0 100644 --- a/.circleci/config.yml +++ b/.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 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 1f5cb18..89a8de0 100644 --- a/.gitignore +++ b/.gitignore @@ -34,4 +34,6 @@ lerna-debug.log* !.vscode/launch.json !.vscode/extensions.json .env -docs/ \ No newline at end of file +docs/ +# Local Netlify folder +.netlify diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000..b81ae75 --- /dev/null +++ b/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/