Skip to content

Commit

Permalink
Merge pull request #34 from snostorm/iojs_org_57-renamed_project
Browse files Browse the repository at this point in the history
Renames iojs/iojs.github.io -> iojs/website
  • Loading branch information
rvagg committed Jan 15, 2015
2 parents 8ee3e39 + 7387c84 commit 65232d2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions setup/www/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This directory contains an Ansible playbook to set up the iojs.org website from a fresh Ubuntu host (Upstart configuration assumes 14.04 or similar).

This setup listens to the [iojs/iojs.github.io](https://github.com/iojs/iojs.github.io) repository for new commits on the *master* branch. The changes are pulled locally and copied (sans the *.git* directory) into a publicly served directory.
This setup listens to the [iojs/website](https://github.com/iojs/website) repository for new commits on the *master* branch. The changes are pulled locally and copied (sans the *.git* directory) into a publicly served directory.

The inventory uses the host `iojs-www`, the easiest way to link this is to add it to your *~/.ssh/config*, something like:

Expand All @@ -12,7 +12,7 @@ Host iojs-www
User root
```

This setup assumes a GitHub Webhook is configured ([here](https://github.com/iojs/iojs.github.io/settings/hooks)) to point to port `9999` of the server with the path `/webhook` plus an additional secret.
This setup assumes a GitHub Webhook is configured ([here](https://github.com/iojs/website/settings/hooks)) to point to port `9999` of the server with the path `/webhook` plus an additional secret.

Note that the *host_vars/iojs-www* file needs to be created, the *host_vars/iojs-www.tmpl* file can be used as a template and simply add the GitHub Webhook secret.

Expand Down
4 changes: 2 additions & 2 deletions setup/www/host_vars/iojs-www.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
github_secret: "INSERT SECRET FROM WEBHOOK HERE"
clone_command: "cd /home/iojs/ && rm -rf iojs.github.io && git clone https://github.com/iojs/iojs.github.io.git"
update_command: "cd /home/iojs/iojs.github.io/ && git checkout master && git reset --hard && git clean -fdx && git pull origin master && rsync -avz --delete --exclude .git /home/iojs/iojs.github.io/ /home/iojs/www/"
clone_command: "cd /home/iojs/ && rm -rf iojs.github.io && rm -rf website && git clone https://github.com/iojs/webite.git"
update_command: "cd /home/iojs/website/ && git checkout master && git reset --hard && git clean -fdx && git pull origin master && rsync -avz --delete --exclude .git /home/iojs/website/ /home/iojs/www/"
4 changes: 2 additions & 2 deletions setup/www/resources/github-webhook.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"log": "/var/log/github-webhook.log",
"rules": [{
"event": "push",
"match": "ref == \"refs/heads/master\" && repository.full_name == \"iojs/iojs.github.io\"",
"match": "ref == \"refs/heads/master\" && repository.full_name == \"iojs/website\"",
"exec": "{{update_command}}"
}]
}
}

0 comments on commit 65232d2

Please sign in to comment.