layout | title | nav |
---|---|---|
default |
Installation |
install |
To start using this template and take advantage of the automatic building system, follow these steps:
There are many ways to do that, though the simplest is probably just by using the GitHub's Fork feature, which basically means "duplicate a repository". After forking, you'll have an option to change the repository name.
Find your repository on GitHub, and go under Settings -> Webhooks & Services. Find the Add webhook button on the top right, and click it.
Fill in the box with the following options (unless told otherwise):
- Payload URL:
http://bits.usc.edu/md_receiver/receiver.php
- Content type:
application/json
- Secret: (ask an admin)
- Which events would you like to trigger this webhook?: Just the
push
event - Active: checked
Make a change to the sites.json
file in the md_receiver
repository and submit a pull request. In a nutshell, this means:
- Fork
md_receiver
- Make your change, add, commit, push
- Submit a Pull Request from GitHub requesting your commit to be merged into the main repository
- Wait for approval, and done.
You'll need to add an object in the json file that describes your site, following this structure:
{
// other repos here...
"username_or_orgname/reponame": {
"target": "target_url"
}
}
Where target_url
is where your website will be deployed to (e.g., http://bits.usc.edu/target_url
).
Alternatively, if you expect that you will be creating multiple sites, ask an admin to become a collaborator.
You will need to do a pull on the bits.usc.edu:www/docs/md_receiver
repo.
You will also need to add ptzbot
with write access to your website repo.
Follow the [Usage Guide]({{ site.url }}/guide.html), and edit your website. Create pages, upload files, etc. Take advantage of git's collaborative nature and go crazy with your fellow teaching staff.
Make sure you've committed all your changes and pushed to GitHub. After then, run the following line:
git push origin master:deploy
This command updates the deploy
branch to where master
is. The website will only be deployed whenenever the deploy
branch changes!
Important! Notice that this bahvior is different from the original CS 104 website. Now, you can collaborate on the master
branch without having to worry about deploying an unfinished version of your website.
If everything is setup properly, you should get an email shortly after you push notifying you of the deployment.