Commit 03b4393c authored by Tino Goratsch's avatar Tino Goratsch

add CI/CD jobs for the artifact generation and updating of the API docs

parent f43349e9
Pipeline #15533630 passed with stages
in 14 minutes and 28 seconds
......@@ -16,6 +16,8 @@ before_script:
stages:
- test
- split
- deploy
- post_deploy
test:php71-unit: &php-unit-base
stage: test
......@@ -74,3 +76,44 @@ split:
- git config remote.origin.mirror true
- git fetch
- gitsplit
deploy:generate-artifact:
stage: deploy
before_script:
- bash ./build/gitlab/before_script.sh > /dev/null
- bash ./build/gitlab/before_script_php.sh > /dev/null
script:
- php composer.phar install --no-dev --prefer-dist -o -n --ignore-platform-reqs
artifacts:
name: "release-${CI_COMMIT_TAG}"
paths:
- ACP3
- build/gulp
- designs
- installation
- tests
- uploads
- vendor
- .editorconfig
- .htaccess.sample
- CHANGELOG.md
- composer.json
- composer.lock
- gulpfile.js
- index.php
- LICENSE
- package.json
- package-lock.json
- README.md
# only:
# - tags
post-deploy:apidocs:
stage: post_deploy
before_script:
- bash ./build/gitlab/before_script.sh > /dev/null
- bash ./build/gitlab/before_script_php.sh > /dev/null
script:
- bash ./build/gitlab/generate_api_docs.sh
only:
- tags
#!/bin/bash
BRANCH_NAME='sami-update'
REPO_DIR='apidocs'
curl -O http://get.sensiolabs.org/sami.phar
php sami.phar update .sami.php
git clone https://gitlab.com/ACP3/${REPO_DIR}.git ./build/${REPO_DIR}
cd ./build/${REPO_DIR}
git checkout -q -b ${BRANCH_NAME}
git rm -q -r .
cp -a ../sami/docs/* .
git add .
git commit -am "Updated the API docs"
git checkout -q master
git merge -q ${BRANCH_NAME}
git branch -q -d ${BRANCH_NAME}
git push --all
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment