This repository contains the static site behind dotorg-element, which is composed by multiple apps:
apps/element
: element-web with a custom configapps/matrix.to
: Automattic/matrix.to
We use GitHub actions to fetch the latest release of each app, and deploy the site.
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.
The following GitHub Actions are at play:
- 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
. - When a file changes under
latest-versions/
, fetch apps: for each app, download the release for the version specified in itslatest-versions/
file, extract the release into theapps/
directory, and commit the result if there are any changes. - When a file changes under
apps
, deploy apps: copy each app into thepublic
branch, and apply overrides. - On pushes to the
public
branch, deploy the site: we don't control this action, it's provided by GitHub Pages.
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 ofworkflow_dispatch
andrepository_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 whenpush
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 @ashfame. If you need to provide 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:
- Remove the
ACCESS_TOKEN
secret under Repository secrets - Click Create a new Repository secret
- Use
ACCESS_TOKEN
as the secret's name - Generate a random password with your password manager or equivalent tool
- Enter the generated password in the Secret field
- Click Add secret
The newly generated ACCESS_TOKEN
secret will from now on be used by all actions.