1
0
Fork 0
mirror of https://github.com/heyarne/airsonic-ui.git synced 2026-05-07 02:33:39 +02:00

Add deploy job to circleci

This commit is contained in:
heyarne 2019-12-14 10:03:48 +01:00
commit 8c484abf00
3 changed files with 28 additions and 2 deletions

View file

@ -49,6 +49,26 @@ jobs:
root: /home/circleci/repo/public
paths:
- "*"
deploy:
working_directory: ~/repo
docker:
- image: circleci/openjdk:11-jdk-stretch-node-browsers
steps:
- checkout
- attach_workspace:
at: /home/circleci/repo/public
- restore_cache:
keys:
- build_cache-{{ checksum "package.json" }}-{{ checksum "shadow-cljs.edn" }}
- run:
name: Install dependencies
command: npm install
- run:
name: Deploy to gh-pages branch
command: |
git config user.email "build@circleci.com"
git config user.name "ci-build"
npm run deploy
workflows:
version: 2
@ -60,3 +80,7 @@ workflows:
ignore:
- gh-pages
- build
- deploy:
requires:
- test
- build

View file

@ -66,10 +66,12 @@ $ npm test
# build and optimize the code once for production
$ npm run build
# runs npm run build and publishes everything via gh-pages
# publishes everything via gh-pages
$ npm run deploy
```
There is continuous deployment set up on [circleci](https://circleci.com/gh/heyarne/airsonic-ui) that builds and deploys to `gh-pages` after a commit to the `master` branch.
**Note:** If you have a continuous build running and run `npm run build` or `npm run deploy`, it will delete the compiled tests, causing the continuous tests to not run anymore. This can be fixed by running `npm test` again.
All build artifacts land in `/public`. Don't change anything in there as changes will be overwritten.

View file

@ -9,7 +9,7 @@
"build": "rm -r public/*; run-p copy:* build:*",
"copy:assets": "cp -R src/assets/* public/",
"copy:icons": "cp -R node_modules/open-iconic/font/fonts public",
"deploy": "npm run build && gh-pages -d public -m \"Deploying $(git rev-parse --short HEAD)\"",
"deploy": "gh-pages -d public -m \"Deploying $(git rev-parse --short HEAD)\"",
"dev:cljs": "shadow-cljs watch app test",
"dev:sass": "node-sass -w src/sass/app.sass -o public/app",
"dev:test": "karma start --reporters notify,progress --auto-watch",