Merge pull request #107 from homer0/homer0_ci #16
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
name: Release NPM package | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20.8.1' | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Install dependencies | |
env: | |
HUSKY_SKIP_INSTALL: 1 | |
run: pnpm install --frozen-lockfile | |
- name: Install semantic-release | |
run: pnpm add -g semantic-release@^23.0.7 @semantic-release/changelog@^6.0.3 @semantic-release/git@^10.0.1 | |
- run: semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Remove semantic-release | |
run: pnpm remove semantic-release @semantic-release/changelog @semantic-release/git | |
- name: Generate documentation | |
run: pnpm run docs | |
- name: Deploy documentation | |
uses: JamesIves/[email protected] | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: docs |