Skip to content

Commit

Permalink
Fix paths; add deploy key & example travis script
Browse files Browse the repository at this point in the history
  • Loading branch information
andylolz committed Mar 15, 2019
1 parent eaaf8ac commit f49d711
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 6 deletions.
34 changes: 32 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,38 @@
language: python

python:
- "2.7"
- "2.7"

before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq libxml2-utils

script:
- ./gen.sh
- git clone https://github.com/IATI/IATI-Websites.git
- git clone https://github.com/IATI/IATI-Developer-Documentation.git
- git clone https://github.com/IATI/IATI-Guidance.git
- ln -s ../../IATI-Websites/iatistandard/_templates/ IATI-Extra-Documentation/en
- ln -s ../../IATI-Websites/iatistandard/_static/ IATI-Extra-Documentation/en
- mkdir docs
- cd docs
- git init
- cd ..
- ./combined_gen.sh

addons:
ssh_known_hosts: CHANGEME_HOST

before_deploy:
- openssl aes-256-cbc -K CHANGEME_KEY -iv CHANGEME_INIT_VECTOR -in deploy_rsa.enc -out /tmp/deploy_rsa -d
- eval "$(ssh-agent -s)"
- chmod 600 /tmp/deploy_rsa
- ssh-add /tmp/deploy_rsa

deploy:
provider: script
script:
- rsync -r --delete-after docs-copy/en/_build/dirhtml/ CHANGEME_LOGIN@CHANGEME_HOST:/CHANGEME_PATH/`echo $TRAVIS_BRANCH | sed "s/[^0-9]//g"`
skip-cleanup: true
on:
all_branches: true
condition: $TRAVIS_BRANCH =~ ^version
8 changes: 4 additions & 4 deletions combined_gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
cd docs || exit 1

mkdir en/developer
cp -n ../../IATI-Developer-Documentation/*.rst en/developer
cp -rn ../../IATI-Developer-Documentation/*/ en/developer
cp -n ../IATI-Developer-Documentation/*.rst en/developer
cp -rn ../IATI-Developer-Documentation/*/ en/developer
mkdir en/guidance
cp -n ../..//IATI-Guidance/en/*.rst en/guidance
cp -rn ../../IATI-Guidance/en/*/ en/guidance
cp -n ../IATI-Guidance/en/*.rst en/guidance
cp -rn ../IATI-Guidance/en/*/ en/guidance
mv en/guidance/404.rst en/
mv en/guidance/upgrades* en/
mv en/guidance/introduction* en/
Expand Down
Binary file added deploy_rsa.enc
Binary file not shown.

0 comments on commit f49d711

Please sign in to comment.