Skip to content

Commit

Permalink
Adjust page build workflow for pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
lornajane committed Nov 29, 2024
1 parent 777283e commit 4a4b7ba
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: Deploy Sphinx to GitHub Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main", "master"]

# Allows you to run this workflow manually from the Actions tab
pull_request:
types:
["opened", "reopened", "synchronize"]

workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
Expand All @@ -26,8 +28,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Pages
uses: actions/configure-pages@v5
- uses: actions/setup-python@v5
name: Set up Python
with:
Expand All @@ -41,19 +41,23 @@ jobs:
uv venv
uv sync --all-extras
make html
- name: Set up Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: 'build/html'
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4


# deploy:
# runs-on: ubuntu-latest
# needs: build
# environment:
# name: github-pages
# url: ${{ steps.deployment.outputs.page_url }}
# steps:
# - name: Deploy to GitHub Pages
# id: deployment
# if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
# uses: actions/deploy-pages@v4
#

0 comments on commit 4a4b7ba

Please sign in to comment.