mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-23 00:28:48 +08:00
83 lines
2.2 KiB
YAML
83 lines
2.2 KiB
YAML
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: Setup mdBook
|
|
uses: peaceiris/actions-mdbook@v1
|
|
with:
|
|
mdbook-version: "0.4.10"
|
|
|
|
- name: Install mdbook-combiner
|
|
run: cargo install mdbook-combiner
|
|
|
|
- name: Prepare docs
|
|
run: |
|
|
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/
|
|
|
|
mdbook-combiner -m docs
|
|
mv SUMMARY.md docs/
|
|
|
|
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
|