Skip to content

Commit 49219c5

Browse files
authored
Merge pull request #357 from fractal-analytics-platform/docs
Publish mkdocs docs on github pages
2 parents 5d50661 + f9f8d75 commit 49219c5

File tree

20 files changed

+245
-67
lines changed

20 files changed

+245
-67
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: docs
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
jobs:
10+
11+
docs:
12+
name: "Deploy docs"
13+
runs-on: ubuntu-latest
14+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Deploy docs
20+
uses: mhausenblas/mkdocs-deploy-gh-pages@master
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
REQUIREMENTS: docs/doc-requirements.txt
24+
25+
docs-build:
26+
name: "Test docs build"
27+
runs-on: ubuntu-latest
28+
if: ${{ github.event_name != 'push' || github.ref != 'refs/heads/main' }}
29+
30+
steps:
31+
- uses: actions/checkout@v4
32+
33+
- uses: actions/setup-python@v4
34+
with:
35+
python-version: '3.10'
36+
cache: pip
37+
38+
- name: Install dependencies
39+
run: python -m pip install -r docs/doc-requirements.txt
40+
41+
- name: MKDocs build
42+
run: mkdocs build --config-file mkdocs.yml --strict

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ node_modules
1313
coverage*/
1414
.nyc_output
1515
playwright-report/
16+
venv
17+
site

docs/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--8<-- "CHANGELOG.md"

docs/dependencies.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/development/dependencies.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Dependencies
2+
3+
**in progress**
4+
5+
Here are the main external dependencies and where/how they are used:
6+
7+
* ajv
8+
* datatables
9+
* dompurify
10+
* semver
11+
* jose
12+
* marked

docs/development/docs.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Documentation
2+
3+
**in progress**

docs/development/index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Development
2+
3+
Here are some useful details for `fractal-web` developments:
4+
5+
* [Code-base structure](structure.md)
6+
* [External dependencies](dependencies.md)
7+
* [Tests](tests.md)
8+
* [Documentation](docs.md)
9+
* [Precommit](precommit.md)
10+
* [JSON Schema component](json_schemas.md)

docs/development/json_schemas.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# JSON Schemas for WorkflowTask arguments
2+
3+
**in progress**

docs/development/precommit.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## pre-commit setup
2+
3+
In your local folder, create a file `.git/hooks/pre-commit` with the following content
4+
5+
```bash
6+
#!/bin/bash
7+
npm run pre-commit
8+
RESULT=$?
9+
[ $RESULT -ne 0 ] && exit 1
10+
exit 0
11+
```
12+
13+
and make this file executable (`chmod +x .git/hooks/pre-commit`).
14+
15+
In this way, `npm run pre-commit` will run before every commit. This script is
16+
defined in `package.json`, and points to
17+
[`lint-staged`](https://github.com/okonet/lint-staged). The configuration is
18+
written in `.lintstagedrc.json`, and it lists the checks to perform on each
19+
kind of file (e.g. `eslint` and then `prettier`).

docs/structure.md renamed to docs/development/structure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ is serving the application. This request, with the attached cookies, is then use
7979
8080
The following image provides an overview for the reader of the described architecture.
8181

82-
![proxy-architecture.png](media/proxy-architecture.png)
82+
![proxy-architecture.png](../media/proxy-architecture.png)
8383

8484
To avoid duplicating the logic of each fractal-server endpoint and simplify the error handling, a special Svelte route has been setup to act like a transparent proxy: `src/routes/api/[...path]/+server.js`. This is one of the suggested way to handle a different backend [according to Svelte Kit FAQ](https://kit.svelte.dev/docs/faq#how-do-i-use-x-with-sveltekit-how-do-i-use-a-different-backend-api-server).
8585

0 commit comments

Comments
 (0)