Skip to content

Merge pull request #67 from MichealWayne/feat-utils-npm #27

Merge pull request #67 from MichealWayne/feat-utils-npm

Merge pull request #67 from MichealWayne/feat-utils-npm #27

name: PUBLISH FE-TOOLS DOCS
on:
push:
branches:
- master
# or set up your own custom triggers
permissions:
contents: write # allows the 'Commit' step without tokens
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- run: mkdir -p ./docs
- run: rm -rf ./docs
- run: mkdir -p ./docs
- name: Build
uses: actions/setup-node@v3
with:
node-version: 16.x
# cache: 'npm'
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- run: cd utils && pnpm install && npm run docs
- name: tar the new docs
run: tar -cvf newdocumentation.tar ./docs
- name: create a new document artifact
uses: actions/upload-artifact@v3
with:
name: newdocumentation
path: newdocumentation.tar
commit:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- run: mkdir -p ./docs
- name: Download the new documents artifact
uses: actions/download-artifact@v3
with:
name: newdocumentation
- run: tar -xf newdocumentation.tar ./docs -C ./docs
- run: rm newdocumentation.tar
- run: mv -f ./datas ./docs
- name: commit
run: |
git config --global user.email "[email protected]"
git config --global user.name "MichealWayne"
git add -A
git commit -m "CI updated the documentation"
git push --quiet origin master