diff --git a/.circleci/config.yml b/.circleci/config.yml index 789a02e59..a0a1dad5b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,8 +1,5 @@ version: 2.1 -orbs: - gh-pages: sugarshin/gh-pages@0.0.6 - defaults: &defaults working_directory: ~/repo docker: @@ -39,25 +36,6 @@ jobs: paths: - . - # TODO - Fix CI Docs build. - # build_docs: - # <<: *defaults - # steps: - # - attach_workspace: - # at: ~/repo - - # - run: - # name: Build with DruxtJS Docgen - # command: npm run docs:build - - # - store_artifacts: - # path: ~/repo/docs/.vuepress/dist - - # - persist_to_workspace: - # root: ~/repo - # paths: - # - . - test: <<: *defaults steps: @@ -102,9 +80,6 @@ workflows: test_deploy: jobs: - build - # - build_docs: - # requires: - # - build - test: requires: - build @@ -115,11 +90,3 @@ workflows: # filters: # branches: # only: master - # - gh-pages/deploy: - # build-dir: ../repo/docs/.vuepress/dist - # requires: - # - build_docs - # ssh-fingerprints: "c9:f9:e5:7d:4f:b2:5e:1e:f1:9a:5e:eb:47:91:10:b8" - # filters: - # branches: - # only: master diff --git a/.lagoon.yml b/.lagoon.yml new file mode 100644 index 000000000..dc9cbb29a --- /dev/null +++ b/.lagoon.yml @@ -0,0 +1 @@ +docker-compose-yaml: ./docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..b10d8758e --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,18 @@ +version: '2.3' + +x-lagoon-project: + &lagoon-project druxtjs-org + +x-environment: + &default-environment + LAGOON_PROJECT: *lagoon-project + +services: + app: + build: + context: . + dockerfile: ./docs/Dockerfile + labels: + lagoon.type: node + ports: + - "3000:3000" diff --git a/docs/Dockerfile b/docs/Dockerfile new file mode 100644 index 000000000..3b4ffdac6 --- /dev/null +++ b/docs/Dockerfile @@ -0,0 +1,19 @@ +FROM amazeeio/node:14-builder as builder + +# Build source files. +COPY . /app/ +RUN yarn +RUN yarn build +RUN yarn build:docs + +# Build static files. +FROM amazeeio/node:14 +COPY --from=builder /app/docs /app + +RUN yarn +RUN yarn generate + +ENV HOST 0.0.0.0 +EXPOSE 3000 + +CMD ["yarn", "start"]