feat: use stac-api's new python feature (#10) #23
This file contains 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: Docs | |
on: | |
push: | |
branches: | |
- gh-pages | |
- main | |
tags: | |
- "v*" | |
workflow_dispatch: | |
concurrency: | |
group: docs | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # to get gh-pages | |
- uses: astral-sh/setup-uv@v3 | |
- name: Sync | |
run: uv sync | |
- name: Push | |
if: github.event_name == 'push' && startsWith(github.ref_name, 'v') | |
run: uv run mike deploy ${{ github.ref_name }} latest --push | |
env: | |
GIT_COMMITTER_NAME: ci-bot | |
GIT_COMMITTER_EMAIL: [email protected] | |
- name: Checkout gh-pages | |
run: | | |
cargo clean | |
rm -rf .venv | |
git restore . | |
git checkout gh-pages | |
- uses: actions/upload-pages-artifact@v3 | |
id: deployment | |
with: | |
path: . | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
needs: build | |
permissions: | |
id-token: write | |
pages: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- uses: actions/deploy-pages@v4 | |
id: deployment |