Merge pull request #58 from MichealWayne/feat-202401-templates #19
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: 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 | |
- 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 |