diff --git a/README.md b/README.md
index 5481574..31adb1b 100644
--- a/README.md
+++ b/README.md
@@ -13,6 +13,7 @@ Please note Apollo v1 can be viewed at http://apollo.s24.net/
### Installation
From within the project root
+
```bash
# Switch your version of Node to the correct version for this project (see .nvmrc)
nvm use
@@ -55,15 +56,38 @@ npm run watch
## Deployment instructions
-### Deploy to Staging
+Please note that files are currently deployed from your local file system, and not from Git. So please ensure you are on
+the right branch before you deploy and your code is up-to-date.
-Please note that files are currently deployed from your local file system, and not from Git. This is likely to change in
-the near future, but for now - it works!
+### Deploy to Production
+
+````bash
+dep deploy production
+````
+
+### Deploy to Staging
````bash
-npm run build && dep deploy staging
+dep deploy staging
````
+## Creating a release
+
+We use [semantic versioning](https://semver.org/) for releases. For example:
+
+* Major release: v2.0
+* Minor release: v2.1
+* Beta release: v2.0-beta.1
+
+To create a new release:
+
+* Go to [releases](https://github.com/studio24/apollo/releases) > Draft a new release
+* Set the tag & title to the release name (see above)
+* Make sure you choose the right branch
+* Publish release
+
+This then creates a set of downloadable links for the package on the releases page.
+
## Contributions
### To report an issue
diff --git a/deploy.php b/deploy.php
index 5c13fe8..6e8a60f 100644
--- a/deploy.php
+++ b/deploy.php
@@ -11,8 +11,8 @@
set('keep_releases', 10);
// Hosts
-
host('production')
+ ->stage('production')
->hostname('63.34.69.8')
->user('deploy')
->set('deploy_path','/data/var/www/vhosts/apollo-v2/production');
@@ -28,6 +28,8 @@
desc('Deploy Apollo v2');
task('deploy', [
'deploy:info',
+ 'deploy:build_prod',
+ 'deploy:build_stage',
'deploy:prepare',
'deploy:lock',
'deploy:release',
@@ -39,6 +41,16 @@
'success'
]);
+task('deploy:build_prod', function () {
+ writeln("Building site assets");
+ run('npm run build');
+})->local()->onStage('production');
+
+task('deploy:build_stage', function () {
+ writeln("Building site assets");
+ run('npm run build');
+})->local()->onStage('staging');
+
task('deploy:copy_code', function () {
writeln("Uploading files to server");
upload(__DIR__ . '/web', '{{release_path}}');