Skip to content

Commit 2067061

Browse files
committed
Adjust page build workflow for pull requests
1 parent 4ff5bca commit 2067061

1 file changed

Lines changed: 19 additions & 15 deletions

File tree

‎.github/workflows/static.yml‎

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
name: Deploy Sphinx to GitHub Pages
22

33
on:
4-
# Runs on pushes targeting the default branch
54
push:
65
branches: ["main", "master"]
76

8-
# Allows you to run this workflow manually from the Actions tab
7+
pull_request:
8+
types:
9+
["opened", "reopened", "synchronize"]
10+
911
workflow_dispatch:
1012

1113
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
@@ -26,8 +28,6 @@ jobs:
2628
steps:
2729
- name: Checkout
2830
uses: actions/checkout@v4
29-
- name: Set up Pages
30-
uses: actions/configure-pages@v5
3131
- uses: actions/setup-python@v5
3232
name: Set up Python
3333
with:
@@ -41,19 +41,23 @@ jobs:
4141
uv venv
4242
uv sync --all-extras
4343
make html
44+
- name: Set up Pages
45+
uses: actions/configure-pages@v5
4446
- name: Upload artifact
4547
uses: actions/upload-pages-artifact@v3
4648
with:
4749
# Upload entire repository
4850
path: 'build/html'
49-
deploy:
50-
runs-on: ubuntu-latest
51-
needs: build
52-
environment:
53-
name: github-pages
54-
url: ${{ steps.deployment.outputs.page_url }}
55-
steps:
56-
- name: Deploy to GitHub Pages
57-
id: deployment
58-
uses: actions/deploy-pages@v4
59-
51+
52+
# deploy:
53+
# runs-on: ubuntu-latest
54+
# needs: build
55+
# environment:
56+
# name: github-pages
57+
# url: ${{ steps.deployment.outputs.page_url }}
58+
# steps:
59+
# - name: Deploy to GitHub Pages
60+
# id: deployment
61+
# if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
62+
# uses: actions/deploy-pages@v4
63+
#

0 commit comments

Comments
 (0)