Skip to content

Commit

Permalink
Use GithubAction instead of travis
Browse files Browse the repository at this point in the history
  • Loading branch information
yne committed Feb 26, 2023
1 parent 4a3f964 commit e52e772
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 12 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: ci

on:
push:
branches:
- master
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: 18
- run: npm install
- run: npm run build
- run: npm run dist
- run: npm run test


31 changes: 31 additions & 0 deletions .github/workflows/page.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Deploy to GH Pages

on:
push:
branches:
- master

permissions:
pages: write
contents: read
id-token: write

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: 18
- run: npm install
- run: npm run build
- run: npm run dist
- run: mv dist docs
- uses: actions/configure-pages@v3
- uses: actions/upload-pages-artifact@v1
with:
path: docs
- run: find docs
- uses: actions/deploy-pages@v1

25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: release

on:
push:
tags:
- '*'

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm run build
- run: npm run dist
- run: npm run test
- run: npm pkg set name=$(basename ${{github.repository}})
- run: npm pkg set version=${{github.ref_name}}
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*.iml
.DS_Store
/node_modules
/build
/dist
npm-debug.log
/.reify-cache
/experiments
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

0 comments on commit e52e772

Please sign in to comment.