Subversion Dreamhost Coda
I am a intermediate web developer, I am attempting to integrate subversion into my workflow. I have come to the understanding, that it is something important to learn, and can save me from rewrite issue nightmares in the future.
My current host is dreamhost I have setup subversion with them, and I have checked out the project(my syntax may be way off here) with versions(for the mac) and have been using coda(for the mac) to commit changes.
When I visit the directory my commits are stored in, on the server, they are rendered as plain text. Currently when I commit something I also ftp upload to a different directory, so I can view the actually site. I can rollback in coda to different versions and then upload via ftp.
I am not sure if I am doing this properly, am I still supposed to commit and ftp upload side by side, or can I just do the commits and have the most recent commit show up as a rendered webpage without touching ftp at all?
Do I make sense?
You are correct. You want to commit your code to the repository, then ftp to the server where you want the changes to be. If you rollback your code in the repository, you can then ftp your changed files.
Quick question: Are you able to test your code locally? If not, you may want to go with this workflow:
- Make changes to code.
- Upload via ftp to a development directory on Dreamhost where you can view and test.
- If there are bugs, fix them and repeat.
- When your changes are working, commit your changes to subversion
- Then upload your files to the production directory (where things are live).
This way, you never accidentally ftp up broken code to your production environment.
www.beanstalkapp.com is a hosted subversion service that can do all this for you. You can integrate it nicely with coda, then deploy from their site.
Take a look at it.
Since Dreamhost offers console access to most (all?) hosting accounts, you'd probably want to just have a checkout of your repo on the server that you can update after you commit from your local dev environment. So, something like this:
- Make edits to local project
- Commit local project to repo
- SSH to Dreamhost, cd into the directory where your site lives
- svn up
That's what I do (using almost exactly the same set of tools, minus Coda) and it works perfectly and you wouldn't have to mess with FTP.