Skip to content

Push locales to Crowdin #39

Push locales to Crowdin

Push locales to Crowdin #39

Workflow file for this run

name: Push locales to Crowdin
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
pull-locales:
name: Pull locales
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/checkout@v3
name: Checkout docs
with:
path: docs
token: ${{ secrets.BOTICORDAC_TOKEN }}
- uses: actions/checkout@v3
name: Checkout locales
with:
path: locales
repository: boticord/localization
token: ${{ secrets.BOTICORDAC_TOKEN }}
- name: Specify the Git global safe directory
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Generate some shit for Crowdin
run: |
cd docs
npm ci
npm run write-translations
rm -rf ./locale/ru/docusaurus-plugin-content-docs/current
cp -r docs ./locale/ru/docusaurus-plugin-content-docs/current
cd ..
cp -r ./docs/locale/ru/docusaurus-plugin-content-docs/current/* ./locales/src/docs/
- uses: stefanzweifel/git-auto-commit-action@v4
name: Push changes
with:
repository: locales
commit_message: 'chore: pull locales'
commit_user_name: BoticordAC
commit_user_email: [email protected]
commit_author: BoticordAC <[email protected]>