Skip to content
Snippets Groups Projects
Commit 8ce5c7f4 authored by Rok Štular's avatar Rok Štular
Browse files

Merge branch 'main' into 'publish'

Publish latest book

See merge request !26
parents 7d4e116e 71f9ca2c
No related branches found
No related tags found
1 merge request!26Publish latest book
Pipeline #204895 passed
......@@ -36,6 +36,7 @@ build-book:
stage: build
only:
- publish
- main
script:
- pip install -r requirements.txt
- jupyter-book clean book/
......@@ -45,19 +46,19 @@ build-book:
- book/_build/html/
# This job commits the built HTML to the publish-html branch
push-html:
stage: deploy
only:
- publish
before_script:
- apt-get update -y
- apt-get install rsync -y
- git config --global user.name "$GITLAB_USER_NAME"
- git config --global user.email "$GITLAB_USER_EMAIL"
- git fetch origin publish-html
- git checkout publish-html
script:
- rsync -av --delete-after --exclude=".git/" --exclude=".cache/" --exclude="venv/" ./book/_build/html/ .
- git add --all -- ':!.cache/*'
- git commit --allow-empty -m "$CI_COMMIT_MESSAGE"
- git push https://gitlab-ci-token:$ACCESS_TOKEN@gitlab.tudelft.nl/$CI_PROJECT_PATH.git publish-html
# push-html:
# stage: deploy
# only:
# - publish
# before_script:
# - apt-get update -y
# - apt-get install rsync -y
# - git config --global user.name "$GITLAB_USER_NAME"
# - git config --global user.email "$GITLAB_USER_EMAIL"
# - git fetch origin publish-html
# - git checkout publish-html
# script:
# - rsync -av --delete-after --exclude=".git/" --exclude=".cache/" --exclude="venv/" ./book/_build/html/ .
# - git add --all -- ':!.cache/*'
# - git commit --allow-empty -m "$CI_COMMIT_MESSAGE"
# - git push https://gitlab-ci-token:$ACCESS_TOKEN@gitlab.tudelft.nl/$CI_PROJECT_PATH.git publish-html
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment