Skip to content
This repository has been archived by the owner on Apr 7, 2018. It is now read-only.

Commit

Permalink
Update building
Browse files Browse the repository at this point in the history
  • Loading branch information
beberlei committed Jul 26, 2016
1 parent 6f45789 commit 8f64a09
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
3 changes: 2 additions & 1 deletion ansible/files/regenerate-cron
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* * * * * www-data /var/www/doctrine-website-sphinx/build-website.sh
*/15 * * * * doctrine /var/www/doctrine-website-sphinx/bin/build-website.sh
0 0 * * * doctrine php bin/build-apidocs.php site/blog/html/api
11 changes: 11 additions & 0 deletions ansible/provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,17 @@
src=regenerate-cron
dest=/etc/cron.d/doctrine-regenerate
- name: Checkout Website
git: >
repo=https://github.com/doctrine/doctrine-website-sphinx.git
dest=/var/www/doctrine-website-sphinx
accept_hostkey=true
force=yes
- user: name=doctrine shell=/bin/bash home=/var/www/doctrine-website-sphinx

- file: path=/var/www/doctrine-website-sphinx owner=doctrine recurse=yes

handlers:
- name: Restart Nginx
service: name=nginx state=restarted
7 changes: 3 additions & 4 deletions build-website.sh → bin/build-website.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

if [ -f "/var/www/doctrine-website-sphinx/regenerate" ];
then
then
rm /var/www/doctrine-website-sphinx/regenerate

cd /var/www/doctrine-website-sphinx
Expand All @@ -25,7 +25,6 @@ then

mkdir -p site/blog/html/api

php bin/build-apidocs.php site/blog/html/api
cp favicon.ico site/blog/html/favicon.ico
cp site/blog/html/rss.html site/blog/html/rss.xml
elif
cp site/blog/html/rss.html site/blog/html/rss.xml
fi

0 comments on commit 8f64a09

Please sign in to comment.