Skip to content

Commit

Permalink
Create docs.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
divakaivan authored Jul 8, 2024
1 parent ef8d819 commit 2e7ba5e
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build and Deploy Docs

on:
push:
branches:
- gh-pages

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U sphinx
- name: Add docs for files
run: |
sphinx-apidoc -o docs/source/ prefect_orchestration
- name: Build documentation
run: |
cd docs
make html
- name: Deploy to GitHub Pages
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
cd docs/build/html
git init
git add .
git commit -m "Deploy Sphinx documentation"
git push --force --quiet "https://${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" master:gh-pages

0 comments on commit 2e7ba5e

Please sign in to comment.