Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
76e83c049This file is pinned to the selected release. Download the original to open it in your design tool.
# Copyright (c) 2021-2024 TiaC Systems
# Copyright (c) 2021 Li-Pro.Net
# SPDX-License-Identifier: Apache-2.0
name: Documentation Remove
on:
workflow_dispatch: # And manually on button click
pull_request:
types: [closed]
branches:
- main
- 'v*-branch'
paths:
- 'doc/**'
- '**.rst'
- 'include/**'
- '.known-issues/doc/**'
- '**/Kconfig*'
- 'west.yml'
- '.github/workflows/doc-*.yml'
jobs:
doc-remove:
name: Remove preview documentation for PRs
runs-on: ubuntu-latest
steps:
- name: Create documentation removing monitor
run: |
mkdir doc && cd doc
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
# basename will work for both branches and tags
branch=$(basename "${{ github.ref }}")
echo "remove preview REF-${branch}" > "monitor_${GITHUB_RUN_ID}.txt"
else
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "remove development PR-${{ github.event.number }}" > \
"monitor_${GITHUB_RUN_ID}.txt"
fi
fi
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: doc
path: doc