Skip to content

Instantly share code, notes, and snippets.

@ScriptAutomate
Last active February 9, 2022 22:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ScriptAutomate/322be9ea9ee179bd03660aa7b1c485ea to your computer and use it in GitHub Desktop.
Save ScriptAutomate/322be9ea9ee179bd03660aa7b1c485ea to your computer and use it in GitHub Desktop.
GitLab CI Publishing Dendron Proof-Of-Concept
---
stages:
- build-docs
- publish-docs
build-docs-html:
stage: build-docs
image: node:lts-bullseye
# Cache modules using lock file
cache:
key:
files:
- yarn.lock
paths:
- node_modules/
- .next/
script:
- yarn
#- (test -d .next) && (echo 'Updating dendron Next.js if updates are available...' && cd .next && git reset --hard && git pull && yarn && cd ..)
- yarn dendron publish init
- yarn dendron publish export
- mv .next/out docs
artifacts:
paths:
- docs
expire_in: 30 days
pages:
stage: publish-docs
image: debian:bullseye-slim
script:
- mv docs public
- 'echo "Gitlab Pages available at: ${CI_PAGES_URL}"'
artifacts:
paths:
- public
expire_in: 30 days
{
"dependencies": {
"@dendronhq/dendron-cli": "*"
}
}
@ScriptAutomate
Copy link
Author

ScriptAutomate commented Feb 9, 2022

Working proof of concept Dendron publishing template on GitLab:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment