-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This changes the data format for activities from JSON to YAML, and uses information from the GitHub issues (the OP and labels). The data is presented on a new dashboard website. There's a workflow to push the `merged-data.json` file to `gh-pages` to publish.
- Loading branch information
Showing
269 changed files
with
3,959 additions
and
74,534 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Build and Deploy | ||
|
||
on: | ||
schedule: | ||
- cron: '0 */6 * * *' # Runs every 6 hours | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: # Allows manual trigger | ||
|
||
jobs: | ||
build_and_deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up SSH for Git (deploy key) | ||
run: | | ||
mkdir -p ~/.ssh | ||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519 | ||
chmod 600 ~/.ssh/id_ed25519 | ||
ssh-keyscan github.com >> ~/.ssh/known_hosts | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install Dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Fetch GitHub data | ||
run: | | ||
python3 gh-data.py | ||
- name: Merge data sources | ||
run: | | ||
python3 merge-data.py | ||
- name: Commit and Push Changes to `gh-pages` | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
git checkout -b gh-pages | ||
git add -f merged-data.json | ||
git add . | ||
# If there are no changes, no commit gets created, and nothing is pushed | ||
git commit -m "Update GitHub Pages with latest data" | ||
git remote set-url origin [email protected]:${{ github.repository }}.git | ||
git push origin gh-pages |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,7 @@ | |
*.swp | ||
*~ | ||
/venv/ | ||
.DS_Store | ||
/gh-data-summary.json | ||
/gh-data.json | ||
/merged-data.json |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Develop | ||
|
||
## Building locally | ||
|
||
The data for the dashboard website is sourced from: | ||
|
||
- The `activities.yml` file | ||
- The GitHub issues in mozilla/standards-positions (text in OP, labels) | ||
|
||
To fetch the GitHub information: | ||
|
||
``` | ||
python3 gh-data.py | ||
``` | ||
|
||
This will create or overwrite `gh-data.json` and `gh-data-summary.json`. | ||
|
||
Then, to combine that data with the information in `activities.yml`: | ||
|
||
``` | ||
python3 merge-data.py | ||
``` | ||
|
||
This will create `merged-data.json` which is used by `index.html`. | ||
|
||
To view the dashboard page locally, you need to start a local web server: | ||
|
||
``` | ||
python3 -m http.server 8000 | ||
``` | ||
|
||
Then load http://localhost:8000/ in a web browser. | ||
|
||
## GitHub Actions / Publishing | ||
|
||
Publishing happens automatically when pushing to `main` as well as every 6 hours (to reflect any | ||
changes to labels in GitHub) with the `build-and-deploy.yml` workflow. It can also be triggered | ||
manually from the Actions page. This workflow needs a deploy key (Settings, Deploy keys), and the | ||
private key stored as an environment secret named SSH_PRIVATE_KEY (Settings, Secrets and variables, | ||
Actions). |
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
Oops, something went wrong.