Commit 754199e7 by Arun Babu Neelicattu Committed by Bjorn Neergaard

ci: allow doc builds from forks

parent 141d9ebb
name: "Documentation Preview" name: "Documentation Preview"
on: on:
push:
paths-ignore:
- '**'
- '!docs/**'
- '!.github/workflows/docs.yml'
branches-ignore:
- main
- master
pull_request: pull_request:
# allow repository maintainers to modify and test workflow
paths-ignore:
- "**"
- "!.github/workflows/docs.yml"
pull_request_target:
# enable runs for this workflow when labeled as documentation only
# prevent execution when the workflow itself is modified from a fork
types:
- labeled
paths-ignore: paths-ignore:
- '**' - "**"
- '!docs/**' - "!docs/**"
- '!.github/workflows/docs.yml'
branches:
- '**'
jobs: jobs:
deploy-preview: deploy:
name: Build & Deploy name: Build & Deploy
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: |
(github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'Documentation'))
|| (github.event_name != 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
steps: steps:
- name: Checkout Website Source - name: Checkout Website Source
uses: actions/checkout@v3 uses: actions/checkout@v3
...@@ -32,6 +32,7 @@ jobs: ...@@ -32,6 +32,7 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
path: poetry path: poetry
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v2 uses: actions/setup-python@v2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment