Test out the new docs publishing in staging

This commit is contained in:
Kevin Fenzi 2017-08-24 20:44:39 +00:00
parent 6978888415
commit dc19d02b1d
2 changed files with 11 additions and 4 deletions

View file

@ -1,7 +1,7 @@
- file: dest=/srv/web/docs state=directory
- copy: >
src=docs-sync dest=/usr/local/bin/docs-sync
- template: >
src=docs-sync.j2 dest=/usr/local/bin/docs-sync
owner=root group=root mode=0755
tags:
- fedora-docs

View file

@ -4,10 +4,17 @@ if [ ! -d /srv/web/docs ]
then
echo "/srv/web/docs missing"
cd /srv/web
{% if env == 'staging' %}
git clone https://pagure.io/fedora-docs/fedora-docs-web.git docs
{% else %}
git clone https://pagure.io/fedora-docs-web.git docs
{% endif %}
fi
cd /srv/web/docs
git reset -q --hard
git pull -q
/usr/bin/git reset -q --hard
{% if env == 'staging' %}
/usr/bin/git checkout -q stg
{% endif %}
/usr/bin/git pull -q --ff-only