Skip to content

Commit 971bbf8

Browse files
committed
kleine aanpassingen aan publish
1 parent fd63681 commit 971bbf8

1 file changed

Lines changed: 21 additions & 14 deletions

File tree

.github/workflows/publish.yml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ jobs:
3737
echo "Directory '$dir' bestaat niet, wordt overgeslagen."
3838
fi
3939
done
40-
4140
4241
- name: Extract & validate publishing metadata
4342
id: metadata
@@ -64,7 +63,12 @@ jobs:
6463
SPEC_TYPE=$(get_value_lower 'specType')
6564
SHORT_NAME=$(get_value_lower 'shortName')
6665
PUBLISH_DATE=$(get_value_lower 'publishDate')
67-
66+
67+
if [[ "$SPEC_STATUS" == "wv" ]]; then
68+
echo "::error title=Ongeldige status voor publicatie::Document met status 'wv' (Werkversie) mag niet gepubliceerd worden."
69+
exit 1
70+
fi
71+
6872
# 3. Check op ontbrekende waarden
6973
MISSING=()
7074
for VAR in DOMAIN SPEC_STATUS SPEC_TYPE SHORT_NAME PUBLISH_DATE; do
@@ -147,28 +151,31 @@ jobs:
147151
mkdir -p docs.geostandaarden.nl/${{ steps.metadata.outputs.folderPath }}
148152
cp -r content/* docs.geostandaarden.nl/${{ steps.metadata.outputs.folderPath }}/
149153
rm docs.geostandaarden.nl/${{ steps.metadata.outputs.folderPath }}/js/config.js
150-
- name: Bepaal doelbranch voor PR
151-
id: branch
154+
- name: Push naar develop bij pre-release
155+
if: ${{ github.event.release.prerelease == true }}
152156
run: |
153-
if [[ "${{ github.event.release.prerelease }}" == "true" ]]; then
154-
echo "branch=develop" >> $GITHUB_OUTPUT
155-
else
156-
echo "branch=main" >> $GITHUB_OUTPUT
157-
fi
158-
159-
- name: Create PR
157+
cd docs.geostandaarden.nl
158+
git config user.name "${{ github.actor }}"
159+
git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
160+
git checkout develop || git checkout -b develop origin/develop
161+
git add .
162+
git commit -m "Automatische pre-release update van ${{ github.repository }}"
163+
git push origin develop
164+
165+
- name: Create PR naar main bij release
166+
if: ${{ github.event.release.prerelease != true }}
160167
uses: peter-evans/create-pull-request@v5
161168
with:
162169
token: ${{ secrets.GH_PUSH_TOKEN }}
163170
path: docs.geostandaarden.nl
164171
branch: auto-update-${{ github.run_id }}
165-
base: ${{ steps.branch.outputs.branch }}
172+
base: main
166173
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
167-
title: "Automated update from ${{ github.repository }} to ${{ steps.branch.outputs.branch }}"
174+
title: "Automated update from ${{ github.repository }} to main"
168175
body: |
169176
Update vanuit workflow voor domein ${{ steps.metadata.outputs.pubdomain }}
170177
Folder: `${{ steps.metadata.outputs.folderPath }}`
171-
To branch: `${{ steps.branch.outputs.branch }}`
178+
To branch: `main`
172179
labels: automated pr
173180
delete-branch: true
174181
reviewers: wilkoquak,fterpstra,lvdbrink

0 commit comments

Comments
 (0)