Sync latest docs from runfinch/finch #422
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: Sync latest docs from runfinch/finch | |
on: | |
schedule: | |
# Pull changes every day at 13:00 UTC. | |
# Eventually switch to using a push based flow with | |
# https://github.com/peter-evans/repository-dispatch | |
- cron: '0 13 * * *' | |
# Allow workflow to be triggered manually. | |
workflow_dispatch: | |
jobs: | |
sync: | |
name: Sync docs | |
if: ${{ github.repository == 'runfinch/finch-website' || github.event_name == 'workflow_dispatch' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout main | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b | |
with: | |
python-version: '3.x' | |
- name: Install script requirements | |
working-directory: ./scripts | |
run: pip install -r requirements.txt | |
- name: Update docs | |
working-directory: ./scripts | |
run: | | |
git status | |
git clean -f -d | |
python get_upstream_docs.py | |
- name: Create PR | |
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
signoff: true | |
title: 'docs: Sync docs from runfinch/finch' |