Skip to content
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.

Automattic/chat.a8c.com

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chat.a8c.com

This repository contains the static site behind chat.a8c.com, which is composed by multiple apps:

We use GitHub actions to fetch the latest release of each app, and deploy the site.

Overrides

You can override any file of any app, by placing it under the same path under the overrides directory. For example, overrides/element/index.html would override apps/element/index.html, upon deployment.

Actions

The following GitHub Actions are at play:

  1. Every day at 00:00 UTC, discover latest versions of apps: check if a new version of each app has been released and if so, write the version in a file under latest-versions/, for example, latest-versions/element.
  2. When a file changes under latest-versions/, fetch apps: for each app, download the release for the version specified in its latest-versions/ file, extract the release into the apps/ directory, and commit the result if there are any changes.
  3. When a file changes under apps, deploy apps: copy each app into the public branch, and apply overrides.
  4. On pushes to the public branch, deploy the site: we don't control this action, it's provided by GitHub Pages.

Access token

GitHub actions are automatically provided with a GITHUB_TOKEN, so normally you don't need to provide your own token. However, using this default token will prevent chaining of actions, i.e. you cannot run an action as a result of another action:

When you use the repository's GITHUB_TOKEN to perform tasks, events triggered by the GITHUB_TOKEN, with the exception of workflow_dispatch and repository_dispatch, will not create a new workflow run. This prevents you from accidentally creating recursive workflow runs.

For example, if a workflow run pushes code using the repository's GITHUB_TOKEN, a new workflow will not run even when the repository contains a workflow configured to run when push events occur.

For this reason, since we do need to chain actions, a Personal Access Token (PAT) must be provided. At the moment, the PAT used belongs to @psrpinto. If you need to provided a different PAT, you can do so as follows.

First, create a Personal Access Token with the following permissions:

  • repo:status
  • repo_deployment
  • public_repo

Make sure it has no expiration and that you give it a meaningful name so future you doesn't accidentally delete it, e.g. github-actions-chat-a8c-com.

Once you have the access token, you must enter it in the Action secrets section of the repository's Settings. Once in that page, proceed as follows:

  1. Remove the ACCESS_TOKEN secret under Repository secrets
  2. Click Create a new Repository secret
  3. Use ACCESS_TOKEN as the secret's name
  4. Generate a random password with your password manager or equivalent tool
  5. Enter the generated password in the Secret field
  6. Click Add secret

The newly generated ACCESS_TOKEN secret will from now on be used by all actions.