Skip to content

Commit

Permalink
ci(docs): Enable
Browse files Browse the repository at this point in the history
  • Loading branch information
gamecss committed May 11, 2024
1 parent b4b8bf1 commit 8967a4d
Showing 1 changed file with 18 additions and 35 deletions.
53 changes: 18 additions & 35 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,38 @@
name: Deploy docs

on:
# push:
# branches: ["async_dev"]
pull_request:
branches: [ "async_dev" ]
push:
branches: ["async_dev"]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false
contents: write

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
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: pdm-project/setup-pdm@v3
with:
python-version: 3.12
cache: true
- name: Install dependencies
run: pdm install -G docs || echo $(pwd)/src > .venv/lib/python3.11/site-packages/pyfsd.pth || true
- name: Build
run: pdm install -G docs
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- name: Build & publish
run: |
source .venv/bin/activate
mkdocs build
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: site

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
needs: build

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
mike deploy --push async_dev && mike set-default --push async_dev

0 comments on commit 8967a4d

Please sign in to comment.