Skip to content
Snippets Groups Projects
Commit 634d6ea1 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema Committed by Marcel Loose
Browse files

Only deploy docs if they were built

parent 62bf934a
No related branches found
No related tags found
No related merge requests found
image: lofareosc/prefactor3-cwl:latest image: lofareosc/prefactor3-cwl:latest
workflow:
rules:
# don't create a pipeline if its a commit pipeline, on a branch and that branch has open merge requests.
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never
- when: always
variables: variables:
TEST_HBA_DATASET_NAME: "test_data.tar.gz" TEST_HBA_DATASET_NAME: "test_data.tar.gz"
CALIBRATOR_HBA_RESULTS_NAME: "results_calibrator.tar.gz" CALIBRATOR_HBA_RESULTS_NAME: "results_calibrator.tar.gz"
...@@ -88,6 +95,8 @@ build-doc: ...@@ -88,6 +95,8 @@ build-doc:
# Only add job for commits to master or on merge request events # Only add job for commits to master or on merge request events
- if: '$CI_COMMIT_BRANCH == "master" && $CI_PIPELINE_SOURCE != "schedule"' - if: '$CI_COMMIT_BRANCH == "master" && $CI_PIPELINE_SOURCE != "schedule"'
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- changes:
- docs/*
deploy-doc: deploy-doc:
stage: deploy stage: deploy
...@@ -101,3 +110,9 @@ deploy-doc: ...@@ -101,3 +110,9 @@ deploy-doc:
- ssh-keyscan -H dop810 > ~/.ssh/known_hosts - ssh-keyscan -H dop810 > ~/.ssh/known_hosts
script: script:
- scp -r docs/build/html/* citt@dop810:prefactor - scp -r docs/build/html/* citt@dop810:prefactor
rules:
# Only run on master
- if: '$CI_COMMIT_BRANCH != "master"'
when: never
- changes:
- docs/*
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