Last active
February 9, 2022 22:48
-
-
Save ScriptAutomate/322be9ea9ee179bd03660aa7b1c485ea to your computer and use it in GitHub Desktop.
GitLab CI Publishing Dendron Proof-Of-Concept
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dependencies": { | |
"@dendronhq/dendron-cli": "*" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Working proof of concept Dendron publishing template on GitLab: