Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
teolemon committed Oct 18, 2024
1 parent 8b7c2cb commit 3d8bd16
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 36 deletions.
80 changes: 44 additions & 36 deletions .github/workflows/dartdoc.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,49 @@
name: GitHub Pages Deploy Action
on:
push:
branches:
- "develop"
jobs:
deploy-pages:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/smooth_app
steps:
name: GitHub Pages Deploy Action
on:
push:
branches:
- "develop"
jobs:
deploy-pages:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/smooth_app
steps:

- name: Chekout code
uses: actions/checkout@v3
- name: Chekout code
uses: actions/checkout@v3

- name: Setup Flutter
uses: actions/cache@v3
with:
path: ${{ runner.tool_cache }}/flutter
key: flutter-2.5.0-stable
- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: 2.5.0
- name: Setup Flutter
uses: actions/cache@v3
with:
path: ${{ runner.tool_cache }}/flutter
key: flutter-2.5.0-stable
- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: 2.5.0

- name: Run Dartdoc
run: pub global activate dartdoc && dartdoc
- name: Run Dartdoc
run: pub global activate dartdoc && dartdoc

- name: Deploy smooth_app documentation to Github Pages
uses: JamesIves/[email protected]
with:
BRANCH: gh-pages
FOLDER: packages/smooth_app/docs/
- name: Install mkdocs and mkdocs-material
run: |
python -m pip install --upgrade pip
pip install mkdocs mkdocs-material
- name: Deploy scanner documentation to Github Pages
uses: JamesIves/[email protected]
with:
BRANCH: gh-pages
FOLDER: packages/smooth_app/docs/
- name: Build documentation using mkdocs
run: mkdocs build

- name: Deploy smooth_app documentation to Github Pages
uses: JamesIves/[email protected]
with:
BRANCH: gh-pages
FOLDER: packages/smooth_app/docs/

- name: Deploy scanner documentation to Github Pages
uses: JamesIves/[email protected]
with:
BRANCH: gh-pages
FOLDER: packages/smooth_app/docs/
36 changes: 36 additions & 0 deletions packages/smooth_app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,39 @@ Submodule containing all the logic of the Smoothie app.
In the future, it will receive as parameters:
- a barcode decoding algorithm
- how to manage the review on the app store

## Documentation

We use `mkdocs` for our documentation. `mkdocs` is a static site generator that's geared towards project documentation. It is written in Python.

### How to use `mkdocs`

1. Install `mkdocs`:
```sh
pip install mkdocs mkdocs-material
```

2. Serve the documentation locally:
```sh
mkdocs serve
```

This will start a local server at `http://127.0.0.1:8000/` where you can view the documentation.

3. Build the documentation:
```sh
mkdocs build
```

This will generate a static site in the `site` directory.

### Deploying the documentation

We use GitHub Pages to host our documentation. The deployment is handled automatically by a GitHub Actions workflow.

To manually deploy the documentation, you can use the following command:
```sh
mkdocs gh-deploy
```

This will build the documentation and push it to the `gh-pages` branch of the repository.
22 changes: 22 additions & 0 deletions packages/smooth_app/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
site_name: Open Food Facts mobile app
docs_dir: doc
repo_url: https://github.com/openfoodfacts/smooth-app
edit_uri: blob/develop/docs/
site_dir: gh_pages

theme:
name: material
palette:
primary: beige
text: black
logo: assets/app/logo_text_black.svg

markdown_extensions:
- footnotes
- mdx_truly_sane_lists
- pymdownx.highlight
- pymdownx.superfences

plugins:
- awesome-pages
- search

0 comments on commit 3d8bd16

Please sign in to comment.