forked from element-hq/element-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into features/superhero-branding
- Loading branch information
Showing
53 changed files
with
4,837 additions
and
2,159 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
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
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,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: vector-im/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 |
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,81 @@ | ||
name: Cut branches | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
element-desktop: | ||
description: Prepare element-desktop | ||
required: true | ||
type: boolean | ||
default: true | ||
element-web: | ||
description: Prepare element-web | ||
required: true | ||
type: boolean | ||
default: true | ||
matrix-react-sdk: | ||
description: Prepare matrix-react-sdk | ||
required: true | ||
type: boolean | ||
default: true | ||
matrix-js-sdk: | ||
description: Prepare matrix-js-sdk | ||
required: true | ||
type: boolean | ||
default: true | ||
jobs: | ||
prepare: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Element Desktop | ||
uses: actions/checkout@v4 | ||
if: inputs.element-desktop | ||
with: | ||
repository: vector-im/element-desktop | ||
path: element-desktop | ||
ref: staging | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
token: ${{ secrets.ELEMENT_BOT_TOKEN }} | ||
- name: Checkout Element Web | ||
uses: actions/checkout@v4 | ||
if: inputs.element-web | ||
with: | ||
repository: vector-im/element-web | ||
path: element-web | ||
ref: staging | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
token: ${{ secrets.ELEMENT_BOT_TOKEN }} | ||
- name: Checkout Matrix React SDK | ||
uses: actions/checkout@v4 | ||
if: inputs.matrix-react-sdk | ||
with: | ||
repository: matrix-org/matrix-react-sdk | ||
path: matrix-react-sdk | ||
ref: staging | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
token: ${{ secrets.ELEMENT_BOT_TOKEN }} | ||
- name: Checkout Matrix JS SDK | ||
uses: actions/checkout@v4 | ||
if: inputs.matrix-js-sdk | ||
with: | ||
repository: matrix-org/matrix-js-sdk | ||
path: matrix-js-sdk | ||
ref: staging | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
token: ${{ secrets.ELEMENT_BOT_TOKEN }} | ||
|
||
- name: Resolve repos | ||
run: | | ||
echo "REPOS=$(ls . | tr '\n' ' ')" >> $GITHUB_ENV | ||
- name: Merge develop | ||
run: | | ||
git config --global user.email "releases@riot.im" | ||
git config --global user.name "RiotRobot" | ||
for REPO in $REPOS; do git -C "$REPO" merge origin/develop; done | ||
- name: Push staging | ||
run: for REPO in $REPOS; do git -C "$REPO" push origin staging; done |
Oops, something went wrong.