Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge main into 9.0 : documentation #65

Merged
merged 5 commits into from
Mar 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Deploy documentation

on:
push:
branches:
- main

workflow_dispatch:

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:
build:
name: Build documentation website with MkDocs
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install poetry
run: pip install -U poetry

- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Install dependencies
run: poetry install --no-root

- name: Setup Pages
id: pages
uses: actions/configure-pages@v4

- name: Build with mkdocs
run: poetry run mkdocs build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./site

deploy:
name: Deploy to GitHub Pages
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@v4
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ vendor/
.phpunit.result.cache
tests/cache/
tools/phpstan/cache/
site/
Empty file removed docs/.nojekyll
Empty file.
3 changes: 3 additions & 0 deletions docs/_nav.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- [Quick start](index.md)
- [With Symfony](symfony.md)
- [Contributing](contributing.md)
Binary file added docs/assets/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,217 changes: 1,217 additions & 0 deletions docs/assets/javascripts/highlight.min.js

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions docs/assets/stylesheets/highlight-github.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 0 additions & 31 deletions docs/index.html

This file was deleted.

File renamed without changes.
3 changes: 0 additions & 3 deletions docs/navigation.md

This file was deleted.

11 changes: 11 additions & 0 deletions docs/overrides/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% extends "base.html" %}

{% block htmltitle %}
{% if page.meta and page.meta.title %}
<title>{{ page.meta.title }} - AutoMapper</title>
{% elif page.title and not page.is_homepage %}
<title>{{ page.title | striptags }} - AutoMapper</title>
{% else %}
<title>{{ config.site_name }}</title>
{% endif %}
{% endblock %}
89 changes: 89 additions & 0 deletions mkdocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
site_name: AutoMapper with on the fly code generation
site_url: https://automapper.jolicode.com/
repo_url: https://github.com/jolicode/automapper
copyright: 'AutoMapper is licensed under <a href="https://github.com/jolicode/automapper/blob/main/LICENSE">MIT license</a>'

edit_uri: edit/main/docs/
docs_dir: docs
exclude_docs: |
doc/_nav.md
theme:
name: material
logo: assets/favicon.png
favicon: assets/favicon.png
icon:
repo: fontawesome/brands/github
language: en
palette:
# Palette toggle for automatic mode
- media: "(prefers-color-scheme)"
scheme: default
primary: white
accent: amber
toggle:
icon: material/brightness-auto
name: Switch to light mode

# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
primary: white
accent: amber
toggle:
icon: material/brightness-7
name: Switch to dark mode

# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: black
accent: amber
toggle:
icon: material/brightness-4
name: Switch to system preference
features:
- content.action.edit
- content.code.copy
- content.tabs.link
- navigation.footer
- navigation.indexes
- navigation.instant
- navigation.instant.prefetch
- navigation.tabs
- navigation.top
- navigation.tracking
- search.highlight
- toc.integrate
custom_dir: docs/overrides

extra:
social:
- icon: fontawesome/brands/github-alt
link: https://github.com/jolicode/automapper
- icon: fontawesome/brands/x-twitter
link: https://twitter.com/jolicode
generator: false

markdown_extensions:
- admonition
- attr_list
- github-callouts
- footnotes
- pymdownx.details
- pymdownx.highlight:
use_pygments: false
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.superfences
- toc:
permalink: true

plugins:
- search
- literate-nav:
nav_file: _nav.md

extra_javascript:
- assets/javascripts/highlight.min.js
extra_css:
- assets/stylesheets/highlight-github.min.css
Loading
Loading