Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify docs workflows #348

Merged
merged 15 commits into from
Mar 27, 2024
38 changes: 38 additions & 0 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
name: Build PR Docs

on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main
Expand Down Expand Up @@ -70,3 +75,36 @@ jobs:
with:
name: docs
path: docs/docs/_build

deploy:
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/main'))
name: Build & Upload Artifact
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: docs
path: docs

- name: remove doctrees
run: rm -rf docs/.doctrees

- name: get directory name
# if this is a tag, use the tag name as the directory name else dev
run: |
if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
echo "branch_name=${{ github.ref/refs\/tags\// }}" >> $GITHUB_ENV
else
echo "branch_name=dev" >> $GITHUB_ENV
fi

- name: Deploy Docs
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: napari/napari.github.io
publish_dir: docs/docs/_build
publish_branch: gh-pages
destination_dir: ${{ env.branch_name }}
cname: napari.org
79 changes: 0 additions & 79 deletions .github/workflows/deploy_docs.yml

This file was deleted.

Loading