This repository has been archived by the owner on Jul 2, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
wercker.yml
73 lines (72 loc) · 2.35 KB
/
wercker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
box: wercker/php
build:
steps:
- script:
name: set timezone in PHP
code: echo 'date.timezone = "Europe/Amsterdam"' >> $HOME/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- script:
name: setup log and cache folder
code: sudo mkdir /var/log/phpdoc.org; sudo chmod 777 /var/log/phpdoc.org; sudo mkdir /tmp/phpdoc.org; sudo chmod 777 /tmp/phpdoc.org
- script:
name: install dependencies
code: |-
composer install --no-interaction
- script:
name: unit tests
code: phpunit --configuration app/
deploy:
steps:
- script:
name: Update apt
code: sudo apt-get update
- script:
name: install python easy_install and pip
code: sudo apt-get install python-setuptools python-pip make subversion
- script:
name: install sphinx-doc
code: sudo easy_install -U sphinx
- script:
name: install ansible
code: sudo pip install ansible
- add-to-known_hosts:
hostname: staging.phpdoc.org
- add-to-known_hosts:
hostname: phpdoc.org
- mktemp:
envvar: PRIVATEKEY_PATH
- create-file:
name: Write private key to file
filename: $PRIVATEKEY_PATH
content: $DEPLOY_KEY_PRIVATE
overwrite: true
hide-from-log: true
- mktemp:
envvar: INVENTORY_PATH
- create-file:
name: Generate ansible inventory
filename: $INVENTORY_PATH
content: $HOSTS
overwrite: true
hide-from-log: true
- script:
name: Retrieve documentation sources
code: ./bin/get-docs.sh
- script:
name: Generate docs
cwd: docs/src
code: make barehtml
- script:
name: Create symlink to generated docs
cwd: app/Resources
code: mkdir docs; cd docs; ln -s ../../../docs/src/.build/html latest
- script:
name: Create symlink to generated phar files
cwd: web
code: ln -s $PHAR_ARTIFACTS_PATH get
- script:
name: Create symlink to latest phar file
cwd: web
code: ln -s get/phpDocumentor-latest.phar phpDocumentor.phar
- script:
name: Run ansible
code: ansible-playbook ansible/playbook.yml -i $INVENTORY_PATH -u mvriel --private-key=$PRIVATEKEY_PATH --extra-vars "project_dir=$WERCKER_SOURCE_DIR releases_dir=$RELEASES_DIR"