Update ci.yaml #322
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.x | |
| - uses: actions/cache@v4 | |
| with: | |
| key: ${{ github.ref }} | |
| path: .cache | |
| - name: Configure Git | |
| run: | | |
| git config --global credential.helper store | |
| echo "https://${{ secrets.MKDOCS_PAT }}:[email protected]" > ~/.git-credentials | |
| - name: Install dependencies | |
| env: | |
| MKDOCS_PAT: ${{ secrets.MKDOCS_PAT }} | |
| run: | | |
| pip install "git+https://${MKDOCS_PAT}@github.com/davidsdesignserver/mkdocs-material-insiders.git" | |
| pip install mkdocs-glightbox | |
| pip install mkdocs-git-revision-date-localized-plugin | |
| pip install mkdocs-git-committers-plugin-2 | |
| pip install pymdown-extensions pyyaml | |
| pip install "mkdocs-material[imaging]" | |
| sudo apt-get install pngquant | |
| - name: Build and Deploy MkDocs | |
| env: | |
| MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.MKDOCS_PAT }} | |
| CI: true | |
| INSIDERS: true | |
| run: | | |
| mkdocs build | |
| mkdocs gh-deploy --force |