mirror of
https://github.com/finegrain-ai/refiners.git
synced 2024-11-14 00:58:13 +00:00
docs.yml: revamp workflow
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 installing PyTorch (needed for mkdocstrings). [1]: https://squidfunk.github.io/mkdocs-material/publishing-your-site/#with-github-actions [2]: https://github.com/mhausenblas/mkdocs-deploy-gh-pages
This commit is contained in:
parent
df45b926aa
commit
3a9cd95615
32
.github/workflows/docs.yml
vendored
32
.github/workflows/docs.yml
vendored
|
@ -10,12 +10,28 @@ jobs:
|
||||||
name: Deploy docs
|
name: Deploy docs
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout main
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
- 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
|
- name: Install Python
|
||||||
uses: mhausenblas/mkdocs-deploy-gh-pages@master
|
- uses: actions/setup-python@v4
|
||||||
env:
|
with:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
python-version: '3.10'
|
||||||
CUSTOM_DOMAIN: refine.rs
|
|
||||||
REQUIREMENTS: ./requirements.docs.txt
|
- name: Handle cache
|
||||||
|
- 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-
|
||||||
|
|
||||||
|
- name: Install MkDocs dependencies
|
||||||
|
- run: pip install -r requirements.docs.txt
|
||||||
|
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
- run: mkdocs gh-deploy --force
|
||||||
|
|
Loading…
Reference in a new issue