Skip to content

Commit

Permalink
Update the CI
Browse files Browse the repository at this point in the history
  • Loading branch information
cedx committed Apr 7, 2024
1 parent 8bd5656 commit 9a2ee28
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 10 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/doc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build the documentation
on:
push:
branches:
- main

jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Fetch sources
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
cache: pip
python-version: 3.12
- name: Install dependencies
run: pip install mkdocs-material mkdocs-git-committers-plugin-2 mkdocs-git-revision-date-localized-plugin
- name: Deploy documentation
run: mkdocs gh-deploy --config-file=etc/mkdocs.yaml --force
5 changes: 3 additions & 2 deletions .github/workflows/main.yaml → .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: main
name: Run the test suite
on: push

jobs:
test:
main:
runs-on: ubuntu-latest
steps:
- name: Fetch sources
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/check_comment.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ catch (error) {
}
```

See the [API reference](https://docs.belin.io/akismet.js/api) for detailed information about the `Author` and `Comment` classes, and their properties.
See the [API reference](../api/) for detailed information about the `Author` and `Comment` classes, and their properties.
2 changes: 1 addition & 1 deletion docs/usage/verify_key.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ catch (error) {
}
```

See the [API reference](https://docs.belin.io/akismet.js/api) for detailed information about the `Client` and `Blog` classes, and their properties and methods.
See the [API reference](../api/) for detailed information about the `Client` and `Blog` classes, and their properties and methods.
14 changes: 11 additions & 3 deletions etc/mkdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ site_url: https://docs.belin.io/akismet.js

docs_dir: ../docs
site_dir: ../www
use_directory_urls: false

edit_uri: edit/main/docs/
repo_name: cedx/akismet.js
repo_url: https://github.com/cedx/akismet.js

copyright: Copyright © Cédric Belin
extra:
generator: false
social:
- icon: fontawesome/solid/globe
link: https://belin.io
Expand All @@ -28,6 +28,7 @@ extra:
- icon: fontawesome/brands/mastodon
link: https://mastodon.social/@cedx
name: Mastodon

extra_css:
- styles.css

Expand All @@ -47,14 +48,20 @@ nav:
- Submit ham: usage/submit_ham.md
- Further reading:
- Testing: testing.md
- API reference: https://docs.belin.io/akismet.js/api
- API reference: api/
- About:
- Changelog: changelog.md
- License: license.md

plugins:
- git-revision-date-localized
- search
- git-committers:
branch: main
cache_dir: var
repository: cedx/akismet.js
- git-revision-date-localized:
enable_creation_date: true
type: timeago

theme:
favicon: favicon.svg
Expand All @@ -67,6 +74,7 @@ theme:
- navigation.instant.progress
- navigation.sections
- navigation.top
- search.suggest
font: false
logo: favicon.svg
name: material
Expand Down
5 changes: 2 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@ export async function build() {

// Deletes all generated files.
export function clean() {
return deleteAsync(["lib", "var/**/*"]);
return deleteAsync(["lib", "var/**/*", "www"]);
}

// Builds the documentation.
export async function doc() {
await build();
await $`typedoc --options etc/typedoc.js`;
for (const file of ["CHANGELOG.md", "LICENSE.md"]) await cp(file, `docs/${file.toLowerCase()}`);
await cp("docs/favicon.ico", "docs/api/favicon.ico");
return $`mkdocs build --config-file=etc/mkdocs.yaml`;
return cp("docs/favicon.ico", "docs/api/favicon.ico");
}

// Performs the static analysis of source code.
Expand Down

0 comments on commit 9a2ee28

Please sign in to comment.