Skip to content

Commit

Permalink
Update deploy-docs.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
acivitillo authored Aug 31, 2024
1 parent 50cbf62 commit f2c0037
Showing 1 changed file with 19 additions and 25 deletions.
44 changes: 19 additions & 25 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,27 @@ name: Deploy MkDocs Site
on:
push:
branches:
- main # Change this to your default branch if different
workflow_dispatch:

- main
permissions:
contents: write
jobs:
build:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout the code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install dependencies
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
python -m pip install --upgrade pip
pip install mkdocs pymdown-extensions mkdocs-material
- name: Build MkDocs site
run: mkdocs build --clean

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site # Path to the built MkDocs site
publish_branch: gh-pages # Target branch for deployment
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force

0 comments on commit f2c0037

Please sign in to comment.