2023-10-16 22:57:03 +00:00
|
|
|
name: Deploy documentation
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [develop]
|
|
|
|
workflow_dispatch: {}
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
docs:
|
|
|
|
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: Setup mdBook
|
|
|
|
uses: peaceiris/actions-mdbook@v1
|
|
|
|
with:
|
|
|
|
mdbook-version: "0.4.10"
|
|
|
|
|
|
|
|
- name: Install mdbook-combiner
|
|
|
|
run: cargo install mdbook-combiner
|
|
|
|
|
2023-10-17 07:48:19 +00:00
|
|
|
- name: Prepare docs
|
2023-10-16 22:57:03 +00:00
|
|
|
run: |
|
2023-10-17 07:48:19 +00:00
|
|
|
mkdir -p docs/element-{desktop,web} docs/matrix-react-sdk
|
|
|
|
|
|
|
|
mv element-desktop/docs "docs/element-desktop/Element Desktop"
|
|
|
|
mv element-desktop/README.md docs/element-desktop/
|
|
|
|
|
|
|
|
mv element-web/docs "docs/element-web/Element Web"
|
|
|
|
mv element-web/README.md docs/element-web/
|
|
|
|
|
|
|
|
mv matrix-react-sdk/docs "docs/matrix-react-sdk/Matrix React SDK"
|
|
|
|
mv matrix-react-sdk/README.md docs/matrix-react-sdk/
|
|
|
|
|
2023-10-16 22:57:03 +00:00
|
|
|
mdbook-combiner -m docs
|
2023-10-17 07:36:22 +00:00
|
|
|
mv SUMMARY.md docs/
|
2023-10-17 07:48:19 +00:00
|
|
|
|
|
|
|
mv element-web/book.toml .
|
|
|
|
|
|
|
|
- name: Build docs
|
|
|
|
run: mdbook build
|
2023-10-16 22:57:03 +00:00
|
|
|
|
|
|
|
- name: Deploy to gh pages
|
|
|
|
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3.9.3
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
publish_dir: ./book
|