Skip to content

Commit

Permalink
Update deploy & release docs
Browse files Browse the repository at this point in the history
  • Loading branch information
simonrjones committed Jun 2, 2020
1 parent 716430a commit 25f7b6d
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 5 deletions.
32 changes: 28 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
14 changes: 13 additions & 1 deletion deploy.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -28,6 +28,8 @@
desc('Deploy Apollo v2');
task('deploy', [
'deploy:info',
'deploy:build_prod',
'deploy:build_stage',
'deploy:prepare',
'deploy:lock',
'deploy:release',
Expand All @@ -39,6 +41,16 @@
'success'
]);

task('deploy:build_prod', function () {
writeln("<info>Building site assets</info>");
run('npm run build');
})->local()->onStage('production');

task('deploy:build_stage', function () {
writeln("<info>Building site assets</info>");
run('npm run build');
})->local()->onStage('staging');

task('deploy:copy_code', function () {
writeln("<info>Uploading files to server</info>");
upload(__DIR__ . '/web', '{{release_path}}');
Expand Down

0 comments on commit 25f7b6d

Please sign in to comment.