Skip to content

Commit

Permalink
Create ci.yml
Browse files Browse the repository at this point in the history
feat(ci): add GitHub Actions CI workflow for MkDocs deployment

This commit introduces a new CI workflow defined in `ci.yml`, designed to automate the deployment of MkDocs documentation to GitHub Pages. The workflow is triggered on pushes to the `master` and `main` branches. It includes steps for checking out the repository, configuring Git credentials for GitHub Actions, setting up Python, caching dependencies, and deploying the site using `mkdocs gh-deploy --force`. This setup ensures that the documentation is automatically built and deployed, facilitating continuous integration and deployment processes.

Signed-off-by: Giulio Menna <[email protected]>
  • Loading branch information
Dioscorides authored Mar 7, 2024
1 parent 76a714e commit bd05dfd
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: ci
on:
push:
branches:
- master
- main
permissions:
contents: write
jobs:
deploy:
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@v4
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: pip install mkdocs-glightbox
- run: mkdocs gh-deploy --force

0 comments on commit bd05dfd

Please sign in to comment.