Skip to content

Commit

Permalink
build(docs-infra): introduce new process for generating data for the …
Browse files Browse the repository at this point in the history
…events page (#45588)

This commit introduces a new process for generating data for the AIO
[events page](https://angular.io/events), which streamlines the process
and minimizes duplication and manual work. For more details, see
`aio/scripts/generate-events/README.md`.

PR Close #45588
  • Loading branch information
gkalpak authored and dylhunn committed Sep 12, 2022
1 parent c9bdf9b commit 2d7ce00
Show file tree
Hide file tree
Showing 22 changed files with 1,561 additions and 540 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/update-events.yml
@@ -0,0 +1,42 @@
name: Update AIO events

on:
workflow_dispatch:
inputs: {}
schedule:
# Run every day at 15:00.
- cron: 0 15 * * *

# Declare default permissions as read only.
permissions:
contents: read

jobs:
update_events:
name: Update `events.json` (if necessary)
if: github.repository == 'angular/angular'
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
with:
# Setting `persist-credentials: false` prevents the github-action account from being the
# account that is attempted to be used for authentication, instead the remote is set to
# an authenticated URL.
persist-credentials: false
- name: Install AIO dependencies
run: yarn --cwd=aio install
- name: Generate `events.json`
run: node aio/scripts/generate-events/index.mjs --ignore-invalid-dates
- name: Create a PR (if necessary)
uses: gkalpak/dev-infra/github-actions/create-pr-for-changes@88c198ae1a3462223cb5c1e83338e4b94b435283
with:
branch-prefix: docs-update-events
pr-title: 'docs: update events'
pr-description: |
Generated `events.json` with the latest events retrieved from the Firebase DB.
pr-labels: |
action: review
comp: docs
target: patch
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
1 change: 0 additions & 1 deletion aio/BUILD.bazel
Expand Up @@ -90,7 +90,6 @@ TEST_DEPS = APPLICATION_DEPS + [
"@aio_npm//karma-jasmine",
"@aio_npm//karma-jasmine-html-reporter",
"@aio_npm//puppeteer",
"@aio_npm//timezone-mock",
]

architect(
Expand Down
19 changes: 19 additions & 0 deletions aio/content/marketing/events-contributing.md
@@ -0,0 +1,19 @@
# Contributing to `events.json`


## About this list

We maintain a list of events (conferences, meetups, etc.) where our team has or will be presenting.
This data is stored in `events.json`.


## How to get an event listed

The `events.json` file is periodically generated from data stored in a Firebase database.
See [here](https://github.com/angular/angular/blob/main/aio/scripts/generate-events/README.md) for more details.

If you want to get an event listed, please get in touch with the Angular DevRel team at [devrel@angular.io](mailto:devrel@angular.io).

> WARNING:
> The `events.json` file is only intended to be updated via a [script](https://github.com/angular/angular/blob/main/aio/scripts/generate-events/index.mjs).
> Do not manually edit the file, because your changes will be overwritten the next time the script runs.

0 comments on commit 2d7ce00

Please sign in to comment.