Merge pull request #204 from tada-team/13165-thread-unread #1166
Workflow file for this run
This file contains 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: Generate and deploy markdown | |
on: [push] | |
env: | |
CLONE_DIR: clone_dir | |
MARKDOWN_FILE: README.md | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: false | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
environment: markdown_deployment | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: '1.16' | |
- name: Clone markdown repo | |
uses: actions/checkout@v2 | |
with: | |
repository: 'tada-team/tdproto-markdown' | |
ssh-key: ${{ secrets.MARKDOWN_DEPLOY_KEY }} | |
path: 'clone_dir' | |
- name: Generate markdown | |
run: | | |
go run ./codegen/markdown/ > "$CLONE_DIR"/"$MARKDOWN_FILE" | |
- name: Commit and upload markdown | |
if: github.ref == 'refs/heads/master' | |
run: | | |
cd "$CLONE_DIR" | |
git add "$MARKDOWN_FILE" | |
git config --global user.email "[email protected]" | |
git config --global user.name "Github Action" | |
git commit -m "Generate markdown on $(date)" --allow-empty | |
git push |