-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from andstor/feat/automation
Feat/automation
- Loading branch information
Showing
5 changed files
with
106 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Build | ||
|
||
on: ["push", "pull_request"] | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
|
||
- name: Test | ||
run: | | ||
npm ci | ||
npm run build --if-present | ||
npm run coverage || npm test | ||
- name: File existence | ||
id: check_files | ||
uses: andstor/file-existence-action@v1 | ||
with: | ||
files: ./coverage/lcov.info | ||
|
||
- name: Coveralls | ||
if: steps.check_files.outputs.files_exists == 'true' | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build Docs | ||
uses: andstor/jsdoc-action@v1 | ||
with: | ||
source_dir: ./src | ||
recurse: true | ||
output_dir: ./out | ||
template_name: minami | ||
front_page: README.md | ||
|
||
- name: Include Examples | ||
run: mv ./examples ./out/ | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} | ||
publish_dir: ./out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Publish package | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Test | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
- run: npm ci | ||
- run: npm run build --if-present | ||
- run: npm test | ||
|
||
publish-npm: | ||
name: Publish to npm | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm install | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters