| name: Translate README | |
| # 注ζιθ¦ζ¨ι..ζδ»₯θ¦εΌε―εε ₯ζι Settings -> Actions -> General -> Workflow permissions:Read and write permissions | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 1 * * 1' # ζ―ε¨θΏθ‘ | |
| jobs: | |
| translate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Clone ripienaar/free-for-dev | |
| run: | | |
| git clone https://github.com/zhezzma/free-for-dev-cn.git free-for-dev | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| - name: Install dependencies | |
| run: | | |
| npm install | |
| - name: Commit and push if changed | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| git add README.md | |
| git commit -m "Update README.md" || echo "No changes to commit" | |
| git push | |