Skip to content

Commit

Permalink
Merge pull request #2057 from acterglobal/ben-simplified-docs
Browse files Browse the repository at this point in the history
Fix Docs generation
  • Loading branch information
gnunicorn authored Aug 13, 2024
2 parents e479f21 + bbc89a3 commit bb7119a
Show file tree
Hide file tree
Showing 304 changed files with 140 additions and 5,148 deletions.
39 changes: 11 additions & 28 deletions .github/workflows/docs.yml → .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,14 @@
name: Docs
name: Reusable Docs Build

on:
push:
branches:
- main
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

workflow_call:

jobs:
docs:
runs-on: ubuntu-20.04
name: Build Latest API Docs
steps:
- uses: actions/checkout@v3
with:
submodules: true

# ---- setup of systems

- uses: actions/checkout@v4
- name: Setup flutter
uses: subosito/flutter-action@v2
with:
Expand Down Expand Up @@ -52,25 +39,21 @@ jobs:
run: |
cargo doc -p acter -p acter-core -p matrix-sdk-store-media-cache-wrapper
echo --- Moving docs
mv target/doc/ docs/static/api/main/rust
mv target/doc/ docs/api/main/rust
- name: Build Dart App
run: flutter pub global run dartdoc --include-external integration_test/main_test.dart --output ../docs/static/api/main/app/
run: flutter pub global run dartdoc --include-external integration_test/main_test.dart --output ../docs/api/main/app/
working-directory: app

- name: Checking for bindings
run: ls -ltas packages/rust_sdk/lib/

- name: Build Dart SDK
run: flutter pub global run dartdoc --output ../../../docs/static/api/main/dart-sdk/
run: flutter pub global run dartdoc --output ../../../docs/api/main/dart-sdk/
working-directory: packages/rust_sdk

# ---- Finalisation for github pages

- name: build zola
uses: shalzz/[email protected]
if: ${{ github.ref == 'refs/heads/main' }}
env:
BUILD_DIR: docs
PAGES_BRANCH: "gh-pages"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload the docs
path: 'docs/'
26 changes: 26 additions & 0 deletions .github/workflows/check-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Docs

on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:

docs:
uses: ./.github/workflows/build-docs.yml
secrets: inherit

deploy:
runs-on: ubuntu-20.04
if: ${{ github.ref == 'refs/heads/main' }}
needs:
- docs
name: Build Latest API Docs
steps:
- name: Deploy to GitHub Pages
if: ${{ github.ref == 'refs/heads/main' }}
id: deployment
uses: actions/deploy-pages@v4
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Demo builds

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy Docs

on:
push:
branches: ["main"]

workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:

docs:
uses: ./.github/workflows/build-docs.yml
secrets: inherit

deploy:
runs-on: ubuntu-20.04
if: ${{ github.ref == 'refs/heads/main' }}
needs:
- docs
name: Build Latest API Docs
steps:
- name: Deploy to GitHub Pages
if: ${{ github.ref == 'refs/heads/main' }}
id: deployment
uses: actions/deploy-pages@v4
File renamed without changes.
File renamed without changes.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "docs/themes/adidoks"]
path = docs/themes/adidoks
url = https://github.com/aaranxu/adidoks.git
2 changes: 1 addition & 1 deletion docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
static/api/main/
api/main/
public
File renamed without changes.
79 changes: 0 additions & 79 deletions docs/config.toml

This file was deleted.

28 changes: 0 additions & 28 deletions docs/content/_index.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/content/admin/_index.md

This file was deleted.

9 changes: 0 additions & 9 deletions docs/content/admin/hosting/_index.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/content/admin/hosting/self-hosting.md

This file was deleted.

9 changes: 0 additions & 9 deletions docs/content/admin/security/_index.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/content/admin/security/encryption.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/content/admin/security/metadata.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/content/admin/security/stack.md

This file was deleted.

9 changes: 0 additions & 9 deletions docs/content/admin/space-admin/_index.md

This file was deleted.

52 changes: 0 additions & 52 deletions docs/content/admin/space-admin/introduction.md

This file was deleted.

Loading

0 comments on commit bb7119a

Please sign in to comment.