New Crowdin updates #73
This file contains hidden or 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: ci | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| test: | |
| name: Test MkDocs Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.x | |
| - name: Cache dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
| path: ~/.cache/pip | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install dependencies | |
| run: | | |
| pip install jieba mkdocs-material mkdocs-static-i18n | |
| - name: Build the site for testing | |
| run: mkdocs build --strict | |
| deploy: | |
| name: Deploy to GitHub Pages | |
| needs: test | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Configure Git Credentials | |
| run: | | |
| git config user.name github-actions[bot] | |
| git config user.email 41898282+github-actions[bot]@users.noreply.github.com | |
| - name: Setup Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.x | |
| - name: Cache dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
| path: ~/.cache/pip | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install dependencies | |
| run: | | |
| pip install jieba mkdocs-material mkdocs-static-i18n | |
| - name: Deploy to gh-pages | |
| run: mkdocs gh-deploy --force |