Skip to content

Commit

Permalink
Merge pull request #121 from asmeurer/docs-separate-deploy
Browse files Browse the repository at this point in the history
Separate docs build and deploy into separate workflows
  • Loading branch information
asmeurer authored Mar 26, 2024
2 parents 8606188 + 6eb4792 commit a3b4d27
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 31 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/docs-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Docs Build

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install Dependencies
run: |
python -m pip install -r docs/requirements.txt
- name: Build Docs
run: |
cd docs
make html
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: docs-build
path: docs/_build/html
27 changes: 27 additions & 0 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Docs Deploy

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: docs-deploy
steps:
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: docs-build

# Note, the gh-pages deployment requires setting up a SSH deploy key.
# See
# https://github.com/JamesIves/github-pages-deploy-action/tree/dev#using-an-ssh-deploy-key-
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: .
ssh-key: ${{ secrets.DEPLOY_KEY }}
force: no
31 changes: 0 additions & 31 deletions .github/workflows/docs.yml

This file was deleted.

0 comments on commit a3b4d27

Please sign in to comment.