Skip to content

Commit

Permalink
docs.yml: revamp workflow
Browse files Browse the repository at this point in the history
Adapted from the Material for MkDocs template[1]. The former workflow
was using mkdocs-deploy-gh-pages[2] which runs in an Alpine-based Docker
container preventing from install PyTorch (needed for mkdocstrings).

Note: this does not use actions/cache (yet).

[1]:
https://squidfunk.github.io/mkdocs-material/publishing-your-site/#with-github-actions
[2]:
https://github.com/mhausenblas/mkdocs-deploy-gh-pages
  • Loading branch information
deltheil committed Feb 1, 2024
1 parent df45b92 commit 77d6b04
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,19 @@ jobs:
name: Deploy docs
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v2
- name: Checkout
- uses: actions/checkout@v4
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Deploy MkDocs
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CUSTOM_DOMAIN: refine.rs
REQUIREMENTS: ./requirements.docs.txt
- name: Install Python
- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install MkDocs dependencies
- run: pip install -r requirements.docs.txt

- name: Deploy to GitHub Pages
- run: mkdocs gh-deploy --force

0 comments on commit 77d6b04

Please sign in to comment.