mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 17:49:33 +00:00
* Move .markdownlint to the root so it applies to the main readme. * Improve .markdownlint, enable proper names checks. * Use markdownlint-cli2 instead of markdownlint-cli as it's more compatible with VSCode extension.
52 lines
1.1 KiB
YAML
52 lines
1.1 KiB
YAML
name: Docs
|
|
|
|
on:
|
|
push:
|
|
branches: [ '*' ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
jobs:
|
|
markdownlint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install markdownlint
|
|
run: npm install -g markdownlint-cli2
|
|
- name: Run markdownlint
|
|
run: markdownlint-cli2 "**/*.md"
|
|
|
|
build_book:
|
|
runs-on: ubuntu-latest
|
|
needs: markdownlint
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install mdBook
|
|
run: cargo install mdbook --vers 0.4.43 --locked
|
|
- name: Build book
|
|
run: cd docs && mdbook build
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: docs/build
|
|
|
|
deploy:
|
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
|
concurrency:
|
|
group: "pages"
|
|
cancel-in-progress: true
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
runs-on: ubuntu-latest
|
|
needs: build_book
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|