Skip to content

add guide to use aichatplus #108

add guide to use aichatplus

add guide to use aichatplus #108

Workflow file for this run

name: ci
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Change permissions
run: chmod 755 docs
- name: Auto-i18n_translate
env:
# 设置环境变量
### API BASE:
CHATGPT_API_BASE: ${{ secrets.CHATGPT_API_BASE }}
### API KEY:
CHATGPT_API_KEY: ${{ secrets.CHATGPT_API_KEY }} #x
run: |
pip install -r tools/translater/requirements.txt
python tools/translater/auto_translater.py || true
- name: Commit translated
run: |
git config user.name ${{ github.actor }}
git config user.email ${{ github.actor }}@users.noreply.github.com
git add .
git commit -a -m "Commit translated" || true
- name: Push changes
uses: ad-m/github-push-action@master
- name: Install MkDocs dependencies
run: pip install -r requirements.txt
- name: Deploy with MkDocs
run: mkdocs gh-deploy --force
- name: Prepare for cn version
run: |
cp docs/assets/ext/footer_nocomment.md docs/assets/ext/footer.md
cp docs/assets/ext/footer_en_nocomment.md docs/assets/ext/footer_en.md
- name: Deploy cn version
run: mkdocs gh-deploy --force --remote-branch gh-pages-cn