| # The only image where dind works on GitLab.com |
| image: gitlab/dind |
| |
| # So we can use Docker inside build script |
| services: |
| - docker:dind |
| |
| # Task for GitHub Pages |
| pages: |
| Â Â stage: deploy |
| Â Â # cache composer data (especially useful if you set up Satis to download packages) |
| Â Â cache: |
| Â Â Â Â paths: |
| Â Â Â Â - composer |
| Â Â script: |
| Â Â - if [ ! -d composer ]; then mkdir composer; fi |
| Â Â # run satis from docker image |
| Â Â - docker run --rm -i -v `pwd`:/build -v `pwd`/composer:/composer -e COMPOSER_AUTH="$COMPOSER_AUTH" composer/satis |
| Â Â # gitlab requires directory to be named public for whatever reason |
| Â Â - mv output public |
| Â Â # artifacts for Pages |
| Â Â artifacts: |
| Â Â Â Â paths: |
| Â Â Â Â - public |
| Â Â Â Â # I don't like any garbage stored in the ci |
| Â Â Â Â expire_in: 1w |
| Â Â # do this only on master branch |
| Â Â only: |
| Â Â -Â Â master |