github.com/tada-team/tdproto@v1.51.57/.github/workflows/markdown_deploy.yml (about) 1 --- 2 name: Generate and deploy markdown 3 4 on: [push] 5 6 env: 7 CLONE_DIR: clone_dir 8 MARKDOWN_FILE: README.md 9 10 concurrency: 11 group: ${{ github.workflow }} 12 cancel-in-progress: false 13 14 jobs: 15 build: 16 runs-on: ubuntu-20.04 17 environment: markdown_deployment 18 steps: 19 - uses: actions/checkout@v2 20 - uses: actions/setup-go@v2 21 with: 22 go-version: '1.16' 23 - name: Clone markdown repo 24 uses: actions/checkout@v2 25 with: 26 repository: 'tada-team/tdproto-markdown' 27 ssh-key: ${{ secrets.MARKDOWN_DEPLOY_KEY }} 28 path: 'clone_dir' 29 - name: Generate markdown 30 run: | 31 go run ./codegen/markdown/ > "$CLONE_DIR"/"$MARKDOWN_FILE" 32 - name: Commit and upload markdown 33 if: github.ref == 'refs/heads/master' 34 run: | 35 cd "$CLONE_DIR" 36 git add "$MARKDOWN_FILE" 37 git config --global user.email "action@github.com" 38 git config --global user.name "Github Action" 39 git commit -m "Generate markdown on $(date)" --allow-empty 40 git push