wikijs-fork/wercker.yml

50 lines
1.3 KiB
YAML
Raw Normal View History

2017-07-23 20:42:45 +00:00
box: node:8-alpine
build:
steps:
- script:
2017-07-23 20:51:15 +00:00
name: install dependencies
2017-07-23 20:42:45 +00:00
code: |
2017-07-23 20:51:15 +00:00
apk update
apk add bash build-base curl git openssh yarn
2017-07-23 20:42:45 +00:00
- script:
name: yarn install
code: |
yarn config set cache-folder "$WERCKER_CACHE_DIR/yarn"
yarn install
- script:
name: build
code: yarn run build
- npm-test
2017-07-24 01:50:50 +00:00
deploy-github:
2017-07-23 20:42:45 +00:00
steps:
- script:
name: package
code: |
2017-07-24 01:59:31 +00:00
tar -czfv wiki-js.tar.gz * -X .build/.deployexclude
2017-07-23 20:42:45 +00:00
yarn install --production --ignore-scripts --prefer-offline
2017-07-24 01:59:31 +00:00
tar -czfv node_modules.tar.gz node_modules
2017-07-24 01:50:50 +00:00
SEMVER_LAST=`npm show wiki.js version`
2017-07-24 01:59:31 +00:00
chmod +x ./.build/semver_next.sh
2017-07-24 01:50:50 +00:00
SEMVER_NEXT=`./.build/semver_next.sh -p $SEMVER_LAST`
- github-create-release:
token: $GITHUB_TOKEN
tag: "v${SEMVER_NEXT}"
prerelease: true
- github-upload-asset:
token: $GITHUB_TOKEN
file: wiki-js.tar.gz
- github-upload-asset:
token: $GITHUB_TOKEN
file: node_modules.tar.gz
deploy-docker:
steps:
- internal/docker-push:
username: $DOCKER_HUB_USERNAME
password: $DOCKER_HUB_PASSWORD
tag: latest
ports: "3000"
entrypoint: node server
repository: requarks/wiki
registry: https://registry.hub.docker.com