Sync site #887
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 site | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
build: | |
name: Sync | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: pip install --user -r requirements.txt | |
- name: Update metadata | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: ./sync.py | |
- name: Commit and push | |
if: github.event_name != 'pull_request' | |
run: | | |
# Do not enable branch protection for main; it'll break this. | |
git config user.name 'CoreOS Bot' | |
git config user.email [email protected] | |
git add docs/_data/* | |
git commit -m "Update data 📦" | |
git push |