chore: cd #14
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: Node CD | |
on: | |
push: | |
branches: | |
- master | |
- dev | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 7.9.5 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'pnpm' | |
- name: Install | |
run: | | |
pnpm install --frozen-lockfile | |
- name: Build Lib | |
run: | | |
pnpm recursive run build | |
- name: Docs-Build | |
run: | | |
cd packages/hooks | |
pnpm install --frozen-lockfile | |
pnpm run initial | |
pnpm run docs:build-github | |
- name: push dist to branch main hooks | |
env: | |
API_TOKEN: ${{ secrets.API_TOKEN }} | |
REF: github.com/InhiblabCore/docs | |
MYEMAIL: 1013588891@qq.com | |
MYNAME: NelsonYong | |
run: | | |
cd packages/hooks/.docs/.vitepress | |
mkdir .temp | |
cd .temp | |
git clone https://${REF}.git | |
git config --global user.email "${MYEMAIL}" | |
git config --global user.name "${MYNAME}" | |
cd docs | |
rm -rf hooks | |
cp -R packages/hooks/.docs/.vitepress/dist packages/hooks/.docs/.vitepress/.temp/docs/hooks | |
git add . | |
git commit -m "Updated By Github Actions With Build ${{github.run_number}} of ${{github.workflow}} For Github Pages" | |
git branch -M main | |
git push --force --quiet "https://${API_TOKEN}@${REF}" main |