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