Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate teams in the CI #34

Merged
merged 7 commits into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/teams.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# A workflow to run the generate_teams.py script in the CI weekly and create a pull request

on:
schedule:
# Run every Monday at 03:00 AM UTC
- cron: "0 3 * * 1"
workflow_dispatch:

jobs:
generate-teams:
runs-on: ubuntu-latest
steps:

- name: Checkout main branch of repository
uses: actions/checkout@v3
with:
ref: main
submodules: recursive

- name: Setup Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- run: python scripts/generate_teams.py
agriyakhetarpal marked this conversation as resolved.
Show resolved Hide resolved
agriyakhetarpal marked this conversation as resolved.
Show resolved Hide resolved

- name: Run the teams generation script
run: python scripts/generate_teams.py

- name: Run pre-commit hooks
run: |
pip install pre-commit
pre-commit install
agriyakhetarpal marked this conversation as resolved.
Show resolved Hide resolved
pre-commit run --all-files

# Will exit silently if there are no changes
- name: Create pull request
uses: peter-evans/create-pull-request@v5
with:
# Commit details
commit-message: "[create-pull-request] update teams HTML files"
# Pull request details
branch: "create-pull-request/generate-teams"
branch-suffix: timestamp
delete-branch: true
base: "main"
title: "Update teams weekly"
body: "This pull request was automatically created by the CI workflow `teams.yml`."
labels: "auto-generated"
reviewers: |
"agriyakhetarpal"
"Saransh-cpp"
"tinosulzer"
"rtimms"
draft: false
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ It is recommended to verify the changes to the teams page before committing. The

**Warning**: The `make teams` command will overwrite the `static/teams/` files.

Alternatively, the teams page can be generated in a pull request by manually triggering the `teams.yml` workflow.

## Deployment

The website is built using the [Hugo](https://gohugo.io) static site generator
Expand Down