{"id":50722683,"url":"https://github.com/berkeley-cdss/course-site-actions","last_synced_at":"2026-06-10T01:30:53.151Z","repository":{"id":358925492,"uuid":"1243733033","full_name":"berkeley-cdss/course-site-actions","owner":"berkeley-cdss","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-19T17:29:08.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-19T19:42:10.355Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/berkeley-cdss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-19T15:59:53.000Z","updated_at":"2026-05-19T17:29:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/berkeley-cdss/course-site-actions","commit_stats":null,"previous_names":["berkeley-cdss/course-site-actions"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/berkeley-cdss/course-site-actions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berkeley-cdss%2Fcourse-site-actions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berkeley-cdss%2Fcourse-site-actions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berkeley-cdss%2Fcourse-site-actions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berkeley-cdss%2Fcourse-site-actions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/berkeley-cdss","download_url":"https://codeload.github.com/berkeley-cdss/course-site-actions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berkeley-cdss%2Fcourse-site-actions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34133404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-10T01:30:52.390Z","updated_at":"2026-06-10T01:30:53.140Z","avatar_url":"https://github.com/berkeley-cdss.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Course Site Actions\n\nThis repository contains reusable GitHub Actions workflows for UC Berkeley CDSS course websites. These workflows automate accessibility scanning (using [Axe-core](https://github.com/dequelabs/axe-core)) and dynamically generate an accessibility badge indicating the number of violations and issues found.\n\nThe badge JSON is pushed to an orphaned `badges` branch so it doesn't pollute your `main` commit history.\n\n## Supported Frameworks\n\nWe provide workflows for **MyST**, **Quarto**, and **Jekyll (Course Overview)** websites.\n\n---\n\n## MyST Websites\n\nFor MyST-based course sites, use the `myst-a11y.yml` workflow. This workflow builds the MyST HTML assets, serves them locally, and runs the Axe accessibility scan.\n\nCreate or update `.github/workflows/a11y.yml` in your course repository:\n\n```yaml\nname: Accessibility Checks\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n  workflow_dispatch:\n\njobs:\n  axe-audit:\n    uses: berkeley-cdss/course-site-actions/.github/workflows/myst-a11y.yml@main\n    with:\n      base_url: /${{ github.event.repository.name }}\n    permissions:\n      contents: write\n```\n\n---\n\n## Quarto Websites\n\nFor Quarto-based course sites, there are two workflow options depending on how your site is structured and deployed.\n\n### Option A: Render from Main\n\nUse this if your workflow manually renders the Quarto site from the `main` branch before deploying. This workflow sets up Quarto, installs dependencies, renders the site to HTML locally, and then runs the Axe scan.\n\nCreate or update `.github/workflows/main-a11y.yml`:\n\n```yaml\nname: Accessibility Checks (main)\n\non:\n  push:\n    branches-ignore:\n      - gh-pages\n  workflow_dispatch:\n\njobs:\n  axe-audit:\n    uses: berkeley-cdss/course-site-actions/.github/workflows/quarto-a11y.yml@main\n    with:\n      site_subdir: ${{ github.event.repository.name }}\n    permissions:\n      contents: write\n      pages: read\n```\n\n### Option B: Post-Pages Deployment (`gh-pages` branch)\n\nUse this if your site uses a GitHub Pages build-deployment workflow that pushes artifacts to a `gh-pages` branch (often used in simpler \"quarto-lite\" setups). This workflow runs *after* the pages deployment completes, checking out the `gh-pages` branch and scanning the built site directly.\n\nCreate or update `.github/workflows/gh-pages-a11y.yml`:\n\n```yaml\nname: Accessibility Checks (gh-pages)\n\non:\n  workflow_run:\n    workflows: [\"pages-build-deployment\"] # Make sure this matches your Pages deployment workflow name\n    types:\n      - completed\n  workflow_dispatch:\n\njobs:\n  axe-audit:\n    uses: berkeley-cdss/course-site-actions/.github/workflows/quarto-a11y-gh-pages.yml@main\n    with:\n      site_subdir: ${{ github.event.repository.name }}\n    permissions:\n      contents: write\n```\n\n---\n\n## Course Overview (Jekyll)\n\nFor the Jekyll-based course overview templates, use the `course-overview-update.yml` workflow. This workflow automates fetching course data from the SIS API, rendering it via Python/Jinja2 templates, and committing the changes back to the repository.\n\nCreate or update `.github/workflows/update.yml`:\n\n```yaml\nname: Update website\n\non:\n  workflow_dispatch:\n  schedule:\n    - cron: \"5 2 1 * *\"\n\njobs:\n  update:\n    uses: berkeley-cdss/course-site-actions/.github/workflows/course-overview-update.yml@main\n    with:\n      SIS_SUBJECT_AREA: ${{ vars.SIS_SUBJECT_AREA }}\n      SIS_CATALOG_NUMBER: ${{ vars.SIS_CATALOG_NUMBER }}\n      AUTHOR: ${{ vars.AUTHOR }}\n      GOOGLE_ANALYTICS_TAG: ${{ vars.GOOGLE_ANALYTICS_TAG }}\n      COURSE_DATA_FILE: ${{ vars.COURSE_DATA_FILE || '/dev/null' }}\n      GIT_NAME: ${{ vars.GIT_NAME }}\n      GIT_EMAIL: ${{ vars.GIT_EMAIL }}\n    secrets:\n      SIS_COURSE_API_ID: ${{ secrets.SIS_COURSE_API_ID }}\n      SIS_COURSE_API_KEY: ${{ secrets.SIS_COURSE_API_KEY }}\n    permissions:\n      contents: write\n```\n\n---\n\n## Displaying the Badge\n\nOnce the workflow runs successfully for the first time, it will create an `a11y-badge.json` file in the `badges` branch. \n\nTo display the badge on your website or in your `README.md`, use a Shields.io custom endpoint URL pointing to the raw JSON file on the `badges` branch. \n\nFor example, using an HTML `\u003cimg\u003e` tag (recommended to bypass build-time bundling):\n\n```html\n\u003cimg src=\"https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/YOUR_ORG_NAME/YOUR_REPO_NAME/badges/a11y-badge.json\" alt=\"Accessibility Badge\"\u003e\n```\n\n\u003e [!IMPORTANT]\n\u003e Remember to replace `YOUR_ORG_NAME` and `YOUR_REPO_NAME` with your actual GitHub org and repository names in the url parameter!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberkeley-cdss%2Fcourse-site-actions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fberkeley-cdss%2Fcourse-site-actions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberkeley-cdss%2Fcourse-site-actions/lists"}