Skip to content

chore: update workflow #17

chore: update workflow

chore: update workflow #17

Workflow file for this run

name: Deploy
on:
workflow_dispatch:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20
- uses: actions/checkout@v2
- name: Build
run: npm run build
- name: Test
run: npm run test
- name: Copy File
run: cp ./package.json ./dist && cp README.md ./dist
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
- name: Publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN} & npm publish ./dist --access public