Merge branch 'main' of https://github.com/Panenco/papi #38
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: Update docs & publish | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
doc-bump-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8.3.1 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
env: | |
RUNNER_TEMP: '/tmp/' | |
with: | |
node-version: '18' | |
cache: 'pnpm' | |
- name: Install | |
run: pnpm install | |
- name: Build app | |
run: pnpm run build | |
- name: Generate Docs | |
run: pnpm run generate-docs | |
- name: Commit updates | |
uses: EndBug/add-and-commit@v9 | |
with: | |
default_author: github_actions | |
message: "CI: update generated docs \n\n | |
[skip ci]" | |
- name: Automated Version Bump | |
id: bump | |
uses: phips28/gh-action-bump-version@master | |
with: | |
tag-prefix: 'v' | |
bump-policy: 'all' | |
commit-message: "CI: bumps version to {{version}} \n\n | |
[skip ci]" | |
- uses: JS-DevTools/npm-publish@v1 | |
with: | |
token: ${{ secrets.ACTION_PUBLISH_TOKEN }} | |
access: public | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: '${{ steps.bump.outputs.newTag }}' | |
release_name: '${{ steps.bump.outputs.newTag }}' |