Skip to content

Commit

Permalink
Upgrade/element web v1.11.53 (#887)
Browse files Browse the repository at this point in the history
* Update all non-major dependencies (#26201)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <[email protected]>

* Update build.yml

* Lock file maintenance (#26205)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency typescript to v5.2.2 (#26390)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <[email protected]>

* Correctly fill window.matrixChat even when a Wrapper module is active (#26395)

Signed-off-by: Dominik Henneke <[email protected]>

* Update react-types (#26124)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Add automation to move Element-R issues to crypto board (#26398)

* triage-labelled: Fix workflow

* Adds labs label to Element R issues (#26324)

* triage-labelled: Fix step input names

* triage-labelled: also set "Status" on ER issues

* Revert "triage-labelled: also set "Status" on ER issues"

This reverts commit e4d365a.

This is better done through the project board automation, otherwise we risk
moving items out of "In Progress" back to "Qualification".

* docs: fixed multiple typos (#26403)

* OIDC: document config (#26400)

* document OIDC config

* tidy

* Delete .github/workflows/upgrade_dependencies.yml

* Update triage-assigned.yml

Update user name

* Enable rust cryptography on develop.element.io (#26291)

Once this lands, *existing* sessions will continue to use legacy crypto, but
*new* logins will use rust crypto.

* Upgrade matrix-react-sdk to 3.83.0

* Upgrade matrix-js-sdk to 29.1.0

* Prepare changelog for v1.11.47

* v1.11.47

* Reset matrix-react-sdk back to develop branch

* Reset matrix-js-sdk back to develop branch

* Document `feedback.new_issue_url` & `feedback.existing_issues_url` (#26446)

* Update update-topics.yaml

* Update update-topics.yaml

* Iterate build_debian.yaml workflow (#26434)

* Update config.md

* Appease the linter

* Add mdbook-mermaid (#26426)

* Update docs.yml

* Remove mermaid config section

Signed-off-by: Michael Telatynski <[email protected]>

* Add script to generate mermaid graph of automations (#26432)

* Update docs.yml

* Bump browserify-sign from 4.2.1 to 4.2.2 (#26459)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update docs.yml

* Update docs.yml

* Vendor in Mermaid v10 for frontmatter title support

Signed-off-by: Michael Telatynski <[email protected]>

* Fix path issues

Signed-off-by: Michael Telatynski <[email protected]>

* prettierignore

Signed-off-by: Michael Telatynski <[email protected]>

* Fix docs workflow

Signed-off-by: Michael Telatynski <[email protected]>

* Use olm from default npm registry, since it's there now (#26461)

* Release prep script for cutting branches (#26392)

* Update release_prepare.yml

* Upgrade matrix-react-sdk to 3.84.0-rc.1

* Upgrade matrix-js-sdk to 30.0.0-rc.1

* Prepare changelog for v1.11.48-rc.1

* v1.11.48-rc.1

* Update titoportas/update-project-fields digest to 421a544 (#26478)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update definitelyTyped (#26479)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency @types/jest to v29.5.7 (#26480)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update actions/setup-node action to v4 (#26484)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency eslint-plugin-unicorn to v49 (#26485)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update all non-major dependencies (#26482)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update build_debian.yaml

* Ship OpenCoDE variant to Dockerhub (#26399)

* Make triage-labelled workflow reusable

* Add input parameter for ELEMENT_BOT_TOKEN

* Upgrade matrix-react-sdk to 3.84.0

* Upgrade matrix-js-sdk to 30.0.0

* Prepare changelog for v1.11.48

* v1.11.48

* Reset matrix-react-sdk back to develop branch

* Reset matrix-js-sdk back to develop branch

* Upgrade webpack to 5.89.0

* Remove unused extract-text-webpack-plugin

* Replace optimize-css-assets-webpack-plugin with css-minimizer-webpack-plugin

* Eliminate use of loader-utils

* Appease the linter

* Ship element-web as a debian package (#26533)

* Update @matrix-org/react-sdk-module-api

* Remove obsolete comment

* Only show overlay on build errors

* Eliminate worklet-loader

* Appease the linter

* Only update repo description once (#26517)

* Update translating-dev.md

* Run Localazy Download on a schedule 3 times a week instead of during release process (#26550)

* Add defaults and fix comment

* Disable automatic publicPath to unbreak worklets

* Update CODEOWNERS

* [create-pull-request] automated change

* [Backport staging] Ship element-web as a debian package (#26563)

Co-authored-by: Michael Telatynski <[email protected]>

* Upgrade matrix-react-sdk to 3.84.1

* Upgrade matrix-js-sdk to 30.0.1

* Prepare changelog for v1.11.49

* v1.11.49

* Update build_debian.yaml

* New release automations (#26495)

* Squashed commit of the following:

commit 069c1bc8331b460275caf492450436f5e127f767
Author: Johannes Marbach <[email protected]>
Date:   Sat Nov 11 16:08:30 2023 +0100

    Replace worker-loader with built-in Webpack 5 support for web workers

* Update mocks for workers / worklets

* Update release-drafter.yml

* Update build_develop.yml

* Explicitly specify secrets

Signed-off-by: Michael Telatynski <[email protected]>

* Upgrade matrix-react-sdk to 3.85.0-rc.1

* Upgrade matrix-js-sdk to 30.1.0-rc.1

* v1.11.50-rc.0

* Use only chokidar for watching and add more logging

* Appease the linter

* Prevent copy-res -w from triggering unnecessary changes while webpack is already building

* Remove unused dependencies and add transitive deps (#26543)

* Update actions/github-script action to v7 (#26583)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update all non-major dependencies (#26581)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Bump crypto-js from 4.1.1 to 4.2.0 (#26460)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update definitelyTyped (#26579)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update babel monorepo to v7.23.3 (#26578)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <[email protected]>

* Update dependency @types/jest to v29.5.8 (#26580)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <[email protected]>

* Update build_debian.yaml

* v1.11.50-rc.1

* Replace copy/watching of non-language assets with copy-webpack-plugin

* Try explicitly relative path for config.json

* Revert "Try explicitly relative path for config.json"

This reverts commit 46ecafa.

* Allow config.json to be missing

* Update copy-webpack-plugin to latest

* Undo auto public path disablement as it doesn't work with workers

* Add feature_disable_call_per_sender_encryption documentation (in labs.md) (#26548)

* add feature_disable_call_per_sender_encryption doc

Co-authored-by: aceArt-GmbH <[email protected]>

---------

Signed-off-by: Timo K <[email protected]>
Co-authored-by: aceArt-GmbH <[email protected]>

* Add custom loader for recorder worklet

* Move worklet rule up to where it used to be

* Set es2022 globally but force CommonJS when using ts-node for scripts

* Add documentation around releases (#26602)

* Upgrade matrix-react-sdk to 3.85.0

* Upgrade matrix-js-sdk to 30.1.0

* v1.11.50

* Update release-gitflow.yml

* Reset matrix-react-sdk back to develop branch

* Reset matrix-js-sdk back to develop branch

* Update CHANGELOG.md

* Set up rudimentary workflow for manually triggering label sync

* Make it preeeeeetty

* Use correct key

* Rename action to not tap outside exclusion list

* Add labels currently added with respect to element-meta

* Fix quotes

* Quote names

* Prettier

* Improve debian package and docs (#26618)

* Setup CI to lint workflows with action-validator

* Add Jitsi SDK as a static resource and set up CI to update it on change

* Make prettier ignore jitsi_external_api.min.js

* Improve rendering style of markdown in the mdbook (#26616)

* Update path

Signed-off-by: Michael Telatynski <[email protected]>

* Add license and copy it into bundle while making terser ignore the SDK

* Enable new room header by default on develop

Relates to: element-hq/element-web#25883

* Adapt to renaming of release-action workflow

* Improve Module API docs & example (#26637)

* Fix types

Signed-off-by: Michael Telatynski <[email protected]>

* Upgrade matrix-react-sdk to 3.86.0-rc.2

* Upgrade matrix-js-sdk to 30.2.0-rc.0

* v1.11.51-rc.0

* Update definitelyTyped (#26666)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update docker/build-push-action digest to 4a13e50 (#26663)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update babel monorepo to v7.23.4 (#26665)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update all non-major dependencies (#26664)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency @types/jest to v29.5.10 (#26667)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency typescript to v5.3.2 (#26668)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* [create-pull-request] automated change

* Adapt label-sync workflow to new version of upstream workflow

* Add missing labels for label sync

This adds all the labels that element-web has over element-meta to labels.yml. There is some deduplication to do that we can take care of over time. This at least should ensure that we don't lose anything we have to day while still benefiting from label sync.

* Replace quotes

* Pretty it up

* Enable label sync workflow

* Undry the workflow

* Upgrade matrix-react-sdk to 3.86.0

* Upgrade matrix-js-sdk to 30.2.0

* v1.11.51

* Reset matrix-react-sdk back to develop branch

* Reset matrix-js-sdk back to develop branch

* Add @nordeck/[email protected] to variants/openDesk/build_config.yaml

Signed-off-by: Charly Nguyen <[email protected]>

* [create-pull-request] automated change

* update to org to element-hq

* Update org in scripts and workflows

* Upgrade matrix-react-sdk to 3.87.0-rc.0

* Upgrade matrix-js-sdk to 30.3.0-rc.0

* v1.11.52-rc.0

* Upgrade matrix-react-sdk to 3.87.0

* Upgrade matrix-js-sdk to 30.3.0

* v1.11.52

* Upgrade matrix-react-sdk to 3.88.0

* v1.11.53

* Remove useless patch better-text-for-tab-switch

* Upgrade patches

* Upgrade conflicting patches

* Upgrade conflict patch bug-reporting. Remove two files from the patch, not needed any more.

* Upgrade conflicted patch customize-room-header-bar

* Upgrade conflicted patch export-room-members

* Upgrade more conflicting patches

* Remove patch remove-fdroid (bug is fixed)

* Remove better-text-for-tab-switch from patches.json

* Fix conflicted patch show-icon-on-public-room

* Last patch fix

* Translation fixes + an updated getVersionInfo for the rust crypto version.

* Fix customize-room-header-bar : messed up brackets

* New style for Export room members button

* Remove no-voip-mentions-in-onboarding patch. Replace with custom translation and customisations-replaced image.

* Fix DecoratedRoomAvatar display bug #890

* Fix one last translation

* Update cypress tests

* Delete .github/labels.yml

we don't neeed extra labels

* fix use of MatrixClientContext

---------

Signed-off-by: Dominik Henneke <[email protected]>
Signed-off-by: Michael Telatynski <[email protected]>
Signed-off-by: Timo K <[email protected]>
Signed-off-by: Charly Nguyen <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <[email protected]>
Co-authored-by: Dominik Henneke <[email protected]>
Co-authored-by: Richard van der Hoff <[email protected]>
Co-authored-by: Richard van der Hoff <[email protected]>
Co-authored-by: Germain <[email protected]>
Co-authored-by: Subash-Lamichhane <[email protected]>
Co-authored-by: Kerry <[email protected]>
Co-authored-by: Johannes Marbach <[email protected]>
Co-authored-by: ElementRobot <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Hubert Chathi <[email protected]>
Co-authored-by: Charly Nguyen <[email protected]>
Co-authored-by: t3chguy <[email protected]>
Co-authored-by: Timo <[email protected]>
Co-authored-by: aceArt-GmbH <[email protected]>
Co-authored-by: David Langley <[email protected]>
Co-authored-by: Florian Duros <[email protected]>
Co-authored-by: Olivier D <[email protected]>
  • Loading branch information
20 people authored Feb 14, 2024
1 parent c2d6e45 commit 263c934
Show file tree
Hide file tree
Showing 125 changed files with 15,372 additions and 12,909 deletions.
9 changes: 5 additions & 4 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
* @vector-im/element-web
/.github/workflows/** @vector-im/element-web-app-team
/package.json @vector-im/element-web-app-team
/yarn.lock @vector-im/element-web-app-team
* @element-hq/element-web
/.github/workflows/** @element-hq/element-web-app-team
/package.json @element-hq/element-web-app-team
/yarn.lock @element-hq/element-web-app-team
/src/i18n/strings
3 changes: 3 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
_extends: matrix-org/matrix-react-sdk
version-resolver:
default: patch
46 changes: 46 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build
on:
pull_request: {}
push:
branches: [develop, master]
# develop pushes and repository_dispatch handled in build_develop.yaml
env:
# These must be set for fetchdep.sh to get the right branch
REPOSITORY: ${{ github.repository }}
PR_NUMBER: ${{ github.event.pull_request.number }}
jobs:
build:
name: "Build on ${{ matrix.image }}"
# We build on all 3 platforms to ensure we don't have any OS-specific build incompatibilities
strategy:
fail-fast: false
matrix:
image:
- ubuntu-latest
- windows-latest
- macos-latest
isDevelop:
- ${{ github.event_name == 'push' && github.ref_name == 'develop' }}
# Skip the ubuntu-latest build for the develop branch as the dedicated CD build_develop workflow handles that
exclude:
- isDevelop: true
image: ubuntu-latest
runs-on: ${{ matrix.image }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
cache: "yarn"

# Workaround for yarn install timeouts, especially on Windows
- run: yarn config set network-timeout 300000

- name: Install Dependencies
run: "./scripts/layered.sh"

- name: Build
run: "yarn build"
76 changes: 49 additions & 27 deletions .github/workflows/build_debian.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,51 +6,73 @@ concurrency: ${{ github.workflow }}
jobs:
build:
name: Build package
if: github.event.release.prerelease == false
environment: packages.element.io
runs-on: ubuntu-latest
env:
R2_INCOMING_BUCKET: ${{ vars.R2_INCOMING_BUCKET }}
R2_URL: ${{ vars.CF_R2_S3_API }}
VERSION: ${{ github.ref_name }}
steps:
- uses: actions/checkout@v4

- name: Download package
run: |
wget "https://github.com/element-hq/element-web/releases/download/$VERSION/element-$VERSION.tar.gz"
wget "https://github.com/element-hq/element-web/releases/download/$VERSION/element-$VERSION.tar.gz.asc"
- name: Check GPG signature
run: |
wget "https://packages.element.io/element-release-key.gpg"
gpg --import element-release-key.gpg
gpg --fingerprint "$FINGERPRINT"
gpg --verify "element-$VERSION.tar.gz.asc" "element-$VERSION.tar.gz"
env:
FINGERPRINT: ${{ vars.GPG_FINGERPRINT }}

- name: Prepare
run: |
mkdir -p /tmp/element-web-debian/DEBIAN
cp -R debian/ /tmp/element-web-debian/DEBIAN/
mkdir -p /tmp/element-web-debian/usr/share/element-web/
mkdir -p debian/tmp/DEBIAN
find debian -maxdepth 1 -type f -exec cp "{}" debian/tmp/DEBIAN/ \;
mkdir -p debian/tmp/usr/share/element-web/ debian/tmp/etc/element-web/
wget https://github.com/vector-im/element-web/releases/download/$VERSION/element-$VERSION.tar.gz
mv element-* /tmp/element-web-debian/usr/share/element-web
mv debian/usr/share/element-web/config.sample.json /tmp/element-web-debian/usr/share/element-web/config.json
tar -xf "element-$VERSION.tar.gz" -C debian/tmp/usr/share/element-web --strip-components=1 --no-same-owner --no-same-permissions
mv debian/tmp/usr/share/element-web/config.sample.json debian/tmp/etc/element-web/config.json
ln -s /etc/element-web/config.json debian/tmp/usr/share/element-web/config.json
- name: Write changelog
run: |
VERSION=$(cat package.json | jq -r .version)
TIME=$(date -d "$PUBLISHED_AT" -R)
{
echo "element-web ($VERSION) default; urgency=medium"
echo "$BODY" | sed 's/^##/\n */g;s/^\*/ */g' | perl -pe 's/\[.+?]\((.+?)\)/\1/g'
echo ""
echo " -- $ACTOR <[email protected]> $TIME"
} > debian/tmp/DEBIAN/changelog
env:
VERSION: ${{ github.ref_name }}
ACTOR: ${{ github.actor }}
VERSION: ${{ github.event.release.tag_name }}
BODY: ${{ github.event.release.body }}
PUBLISHED_AT: ${{ github.event.release.published_at }}

- name: Build deb package
run: |
VERSION=$(cat package.json | jq -r .version)
chmod -R u=rw,go=r /tmp/element-web-debian/usr/share/element-web/
dpkg-deb -Zxz --root-owner-group -VVersion=$VERSION --build /tmp/element-web-debian element-web.deb
dpkg-gencontrol -v"$VERSION" -ldebian/tmp/DEBIAN/changelog
dpkg-deb -Zxz --root-owner-group --build debian/tmp element-web.deb
# For now just upload the artifact to github
- uses: actions/upload-artifact@v3
with:
name: debs
path: "*.deb"
name: element-web.deb
path: element-web.deb
retention-days: 14

#- name: Upload incoming deb
# run: aws s3 cp element-io-archive-keyring.deb "s3://$R2_INCOMING_BUCKET" --endpoint-url "$R2_URL" --region auto
# env:
# AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_TOKEN }}

#reprepro:
# needs: build
# name: Run reprepro
# if: inputs.deploy && github.event.release.prerelease == false
# uses: ./.github/workflows/reprepro.yaml
# secrets: inherit
# with:
# incoming: element-web.deb
- name: Publish to packages.element.io
if: github.event.release.prerelease == false
uses: element-hq/packages.element.io@master
with:
file: element-web.deb
github-token: ${{ secrets.ELEMENT_BOT_TOKEN }}
bucket-api: ${{ vars.CF_R2_S3_API }}
bucket-key-id: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
bucket-access-key: ${{ secrets.CF_R2_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/build_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
build:
name: "Build & Deploy develop.element.io"
# Only respect triggers from our develop branch, ignore that of forks
if: github.repository == 'vector-im/element-web'
if: github.repository == 'element-hq/element-web'
runs-on: ubuntu-latest
environment: develop
env:
Expand All @@ -23,7 +23,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
cache: "yarn"

Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
running-workflow-name: "Build & Deploy develop.element.io"
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
check-regexp: ^((?!SonarCloud|SonarQube|issue|board|label).)*$
check-regexp: ^((?!SonarCloud|SonarQube|issue|board|label|Release).)*$

# We keep the latest develop.tar.gz on R2 instead of relying on the github artifact uploaded earlier
# as the expires after 24h and requires auth to download.
Expand Down
17 changes: 16 additions & 1 deletion .github/workflows/dockerhub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,24 @@ jobs:
name: Docker Buildx
runs-on: ubuntu-latest
environment: dockerhub
strategy:
fail-fast: false
matrix:
include:
- variant: vanilla
# Variant we ship to aid ESS in providing a build on the OpenCoDE platform including specific modules
- variant: opendesk
flavor: suffix=-opendesk,onlatest=true
prepare: mv variants/openDesk/* .
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # needed for docker-package to be able to calculate the version

- name: Prepare
if: matrix.prepare
run: ${{ matrix.prepare }}

- name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3

Expand All @@ -42,9 +55,10 @@ jobs:
type=ref,event=tag
flavor: |
latest=${{ contains(github.ref_name, '-rc.') && 'false' || 'auto' }}
${{ matrix.flavor }}
- name: Build and push
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5
with:
context: .
push: true
Expand All @@ -53,6 +67,7 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}

- name: Update repo description
if: matrix.variant == 'vanilla'
uses: peter-evans/dockerhub-description@dc67fad7001ef9e8e3c124cb7a64e16d0a63d864 # v3
continue-on-error: true
with:
Expand Down
115 changes: 115 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: Deploy documentation

on:
push:
branches: [develop]
workflow_dispatch: {}

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
name: GitHub Pages
runs-on: ubuntu-latest
steps:
- name: Fetch element-desktop
uses: actions/checkout@v4
with:
repository: element-hq/element-desktop
path: element-desktop

- name: Fetch element-web
uses: actions/checkout@v4
with:
path: element-web

- name: Fetch matrix-react-sdk
uses: actions/checkout@v4
with:
repository: matrix-org/matrix-react-sdk
path: matrix-react-sdk

- name: Fetch matrix-js-sdk
uses: actions/checkout@v4
with:
repository: matrix-org/matrix-js-sdk
path: matrix-js-sdk

- uses: actions/setup-node@v4
with:
cache: "yarn"
cache-dependency-path: element-web/yarn.lock

- name: Generate automations docs
working-directory: element-web
run: |
yarn install --frozen-lockfile
yarn ts-node ./scripts/gen-workflow-mermaid.ts ../element-desktop ../element-web ../matrix-react-sdk ../matrix-js-sdk > docs/automations.md
echo "- [Automations](automations.md)" >> docs/SUMMARY.md
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: "0.4.10"

- name: Install mdbook extensions
run: cargo install mdbook-combiner mdbook-mermaid

- name: Prepare docs
run: |
mkdir docs
mv element-desktop/README.md element-desktop/docs/
mv element-desktop/docs "docs/Element Desktop"
mv element-web/README.md element-web/docs/
mv element-web/docs/lib docs/
mv element-web/docs "docs/Element Web"
mv matrix-react-sdk/README.md matrix-react-sdk/docs/
mv matrix-react-sdk/docs "docs/Matrix React SDK"
mv matrix-js-sdk/README.md matrix-js-sdk/docs/
mv matrix-js-sdk/docs "docs/Matrix JS SDK"
sed -i -e 's/\.\.\/README.md/README.md/' docs/**/SUMMARY.md
mdbook-combiner -m docs
sed -i -E 's/^\t# (.+)$/- [\1]()/gm;t' SUMMARY.md
sed -i -E 's/^- \[(.+)]\(<>\)$/---\n# \1/gm;t' SUMMARY.md
sed -i -E 's/\t- \[Introduction]/- [Introduction]/gm;t' SUMMARY.md
cat <<EOF > docs/SUMMARY.md
# Summary
- [Introduction](<Element Web/README.md>)
EOF
cat SUMMARY.md >> docs/SUMMARY.md
mv element-web/book.toml .
- name: Build docs
run: mdbook build

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./book

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
Loading

0 comments on commit 263c934

Please sign in to comment.