Skip to content

Chore: Add Github Actions for Docs #4

Chore: Add Github Actions for Docs

Chore: Add Github Actions for Docs #4

Workflow file for this run

name: Build and Publish Docs
on:
push:
branches:
- main
paths:
- 'geospatial-studio-sdk/docs/**'
- '.github/workflows/publish-docs.yml'
pull_request:
branches:
- main
paths:
- 'geospatial-studio-sdk/docs/**'
- '.github/workflows/publish-docs.yml'
types: [opened, synchronize, reopened]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install poetry
run: pip install poetry
- name: Install dependencies
working-directory: ./geospatial-studio-sdk
run: poetry install
- name: Build documentation
working-directory: ./geospatial-studio-sdk
run: poetry run docs-build
- name: Deploy to GitHub Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./geospatial-studio-sdk/sdk-docs-site
publish_branch: gh-pages
cname: terrastackai.github.io