Skip to content

Commit

Permalink
ci: 🤖 Rewrite the documentation CI
Browse files Browse the repository at this point in the history
  • Loading branch information
AntwortEinesLebens committed Jan 7, 2025
1 parent 02f961f commit 18084cd
Showing 1 changed file with 35 additions and 19 deletions.
54 changes: 35 additions & 19 deletions .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,44 @@
---
name: ci
# SPDX-FileCopyrightText: 2023 The MalwareTracesGenerator development team
#
# SPDX-License-Identifier: CC0-1.0
name: Build and deploy the documentation
on:
push:
branches: [main]
permissions:
contents: write
jobs:
deploy:
build:
name: Build the documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v5
- name: Checkout code
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
python-version: '3.13'
cache: pip
- name: Install Material for MkDocs
run: pip install mkdocs-material
- name: Build MkDocs website
run: mkdocs build
- name: Setup Github Pages
uses: actions/configure-pages@v4
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force
path: ./site
deploy:
name: Deploy the documentation
permissions:
pages: write
id-token: write
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4

0 comments on commit 18084cd

Please sign in to comment.