Skip to content

Gitlab

Gitlab Repo

git@<YOUR GITLABSERVER>:pages/docusaurus.git
├── blog
│   ├── 2018-04-28-blogpost1.md
│   ├── 2018-04-30-blogpost2.md
│   └── 2018-05-03-blogpost3.md
├── docs
│   ├── doc1.md
│   ├── doc2.md
│   ├── doc3.md
│   ├── doc4.md
│   ├── doc5.md
├── Footer.js
├── img
│   └── img1.png
│   ├── img2.png
│   └── img3.png
├── sidebars.json
└── siteConfig.js

.gitlab-ci.yml

---

image: <YOUR DOCKER-REGISTRY>/<DOCUSAURUS-IAGE>:latest

pages:
  only:
    - master
  script:
    - cp -rv /builds/${CI_PROJECT_PATH}/docs/ /site/
    - cp -rv /builds/${CI_PROJECT_PATH}/blog/ /site/website/
    - cp -rv /builds/${CI_PROJECT_PATH}/index.html /site/website/static/
    - cp -rv /builds/${CI_PROJECT_PATH}/img/ /site/website/static/
    - cp -rv /builds/${CI_PROJECT_PATH}/Footer.js /site/website/core/
    - cp -rv /builds/${CI_PROJECT_PATH}/sidebars.json /site/website/
    - cp -rv /builds/${CI_PROJECT_PATH}/siteConfig.js /site/website/
    - cd /site/website/
    - yarn build
    - cp -rv build/${CI_PROJECT_NAME} /builds/${CI_PROJECT_PATH}/public/
  artifacts:
    paths:
      - public

Last update: January 26, 2021

Comments