chore: correct typos (#141) #103
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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Developer Docs | |
on: | |
push: | |
branches: [ next ] | |
jobs: | |
ci: | |
name: Build & Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- uses: pnpm/action-setup@v2 | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
version: 7 | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build Docs... | |
run: pnpm docs:build | |
cd: | |
name: Deploy | |
needs: ci | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- uses: pnpm/action-setup@v2 | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
version: 7 | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build Docs... | |
run: pnpm docs:build | |
#- name: Deploy docs to COS | |
# uses: TencentCloud/cos-action@v1 | |
# with: | |
# secret_id: ${{ secrets.SECRET_ID }} | |
# secret_key: ${{ secrets.SECRET_KEY }} | |
# cos_bucket: ${{ secrets.BUCKET }} | |
# cos_region: ap-chengdu | |
# local_path: docs/.vitepress/dist | |
# remote_path: / | |
# clean: true | |
- name: Deploy docs to Github pages... | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/.vitepress/dist | |
- name: Deploy docs to Hitokoto-2 with SSH | |
uses: easingthemes/[email protected] | |
with: | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | |
REMOTE_HOST: ${{ secrets.SSH_REMOTE_HOST }} | |
REMOTE_USER: ${{ secrets.SSH_REMOTE_USER }} | |
REMOTE_PORT: ${{ secrets.SSH_REMOTE_PORT }} | |
SOURCE: docs/.vitepress/dist/ | |
TARGET: ${{ secrets.SSH_TARGET }} | |