Skip to content
Snippets Groups Projects
Commit 025f09a5 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Add GitLab pages to host published spec versions

parent 2b195c56
No related branches found
No related tags found
No related merge requests found
Pipeline #254 passed
...@@ -73,3 +73,26 @@ Publish spec: ...@@ -73,3 +73,26 @@ Publish spec:
name: "${CI_PROJECT_NAME}_${CI_COMMIT_TAG}" name: "${CI_PROJECT_NAME}_${CI_COMMIT_TAG}"
paths: paths:
- "${CI_PROJECT_NAME}_${CI_COMMIT_TAG}.docx" - "${CI_PROJECT_NAME}_${CI_COMMIT_TAG}.docx"
pages:
stage: publication
only:
- tags
dependencies:
- Publish spec
script:
# Get the previous GitLab Pages content
- set +e
- curl --fail "$CI_PAGES_URL/content.zip" -o "content.zip"
- if [ -e "content.zip" ]; then unzip "content.zip"; rm "content.zip"; fi
- set -e
# Add/update content
- mkdir -p "public/$CI_COMMIT_REF_NAME"
- cp -r -f "${CI_PROJECT_NAME}_${CI_COMMIT_TAG}.docx" public/$CI_COMMIT_REF_NAME
- echo "public/$CI_COMMIT_REF_NAME" >> "public/index.html"
# Zip the content and publish the zip again
- zip -r "content.zip" "public"
- mv "content.zip" "public/"
artifacts:
paths:
- public
\ No newline at end of file
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