mirror of
https://github.com/thegecko/web-bluetooth-dfu.git
synced 2025-12-13 12:38:13 +08:00
46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
version: 2
|
|
|
|
jobs:
|
|
build:
|
|
docker:
|
|
- image: circleci/node:6.15.0
|
|
steps:
|
|
- checkout
|
|
- run: npm install
|
|
- run: npm run gulp
|
|
- persist_to_workspace:
|
|
root: ../
|
|
paths:
|
|
- project
|
|
|
|
deploy:
|
|
docker:
|
|
- image: circleci/node:6.15.0
|
|
steps:
|
|
- attach_workspace:
|
|
at: ../
|
|
- run: mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
|
|
- run: git config --global user.name thegecko
|
|
- run: git config --global user.email github@thegecko.org
|
|
- run: git add --force dist lib types
|
|
- run: git stash save
|
|
- run: git checkout gh-pages
|
|
- run: git merge master --no-commit
|
|
- run: git checkout stash -- .
|
|
- run: git commit --allow-empty --message "Automatic Deployment [skip ci]"
|
|
- run: git push
|
|
- run: 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc'
|
|
- run: npm publish || true
|
|
|
|
workflows:
|
|
version: 2
|
|
commit:
|
|
jobs:
|
|
- build
|
|
- deploy:
|
|
requires:
|
|
- build
|
|
filters:
|
|
branches:
|
|
only: master
|