mirror of
https://github.com/docker-mailserver/docker-mailserver
synced 2024-05-26 11:16:06 +02:00
95983cbebc
Separate workflows for `push` and `pull_request` events. This avoids a `skipped` job status (`Check Run`?) always being presented for the `deploy` job in Pull Requests. --- chore(`.gitignore`): Ignore the `docs/site/` build output Ignore to avoid local builds output appearing in git as unstaged.
34 lines
818 B
YAML
34 lines
818 B
YAML
name: 'Documentation'
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- '.github/workflows/deploy-docs.yml'
|
|
- 'docs/**'
|
|
|
|
# Jobs will run shell commands from this subdirectory:
|
|
defaults:
|
|
run:
|
|
working-directory: docs
|
|
|
|
jobs:
|
|
deploy:
|
|
name: 'Deploy Docs'
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: 'Build with mkdocs-material via Docker'
|
|
run: docker run --rm -v ${PWD}:/docs squidfunk/mkdocs-material build --strict
|
|
|
|
- name: 'Deploy to Github Pages'
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: ./docs/site
|
|
user_name: 'github-actions[bot]'
|
|
user_email: '41898282+github-actions[bot]@users.noreply.github.com'
|