Skip to content

Commit 895f423

Browse files
authored
Update bet-2026-report.yml
1 parent 492e444 commit 895f423

File tree

1 file changed

+9
-25
lines changed

1 file changed

+9
-25
lines changed

.github/workflows/bet-2026-report.yml

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -26,79 +26,63 @@ jobs:
2626
RUN_PIPELINE: ${{ vars.RUN_PIPELINE }}
2727

2828
steps:
29-
# Checkout repository (always required)
3029
- name: Checkout repository
3130
uses: actions/checkout@v3
3231

33-
# Early exit for push when RUN_PIPELINE != true
34-
- name: Skip push event if RUN_PIPELINE is false
32+
# Skip push event if automatic execution is off
33+
- name: Skip push event if RUN_PIPELINE=false
3534
if: ${{ github.event_name == 'push' && env.RUN_PIPELINE != 'true' }}
3635
run: |
37-
echo "Automatic execution is disabled (RUN_PIPELINE=false). Exiting."
36+
echo "Automatic execution is disabled. Exiting."
3837
exit 0
3938
40-
# Pull Docker image for consistent environment
41-
- name: Pull BET-2026 Docker image
42-
if: ${{ github.event_name == 'workflow_dispatch' || env.RUN_PIPELINE == 'true' }}
39+
- name: Pull Docker image
4340
run: docker pull ghcr.io/pacificcommunity/bet-2026:v1.2
4441

45-
# Run the BET-2026 pipeline
4642
- name: Run BET-2026 pipeline
47-
if: ${{ github.event_name == 'workflow_dispatch' || env.RUN_PIPELINE == 'true' }}
4843
run: |
49-
if [ "${{ github.event.inputs.run_mode }}" == "plots_only" ]; then
44+
MODE="${{ github.event.inputs.run_mode }}"
45+
if [ "$MODE" = "plots_only" ]; then
5046
make docker-plot_sens
5147
make docker-plot_grid
52-
elif [ "${{ github.event.inputs.run_mode }}" == "report_only" ]; then
48+
elif [ "$MODE" = "report_only" ]; then
5349
make docker-report
5450
else
5551
make docker-plot_sens
5652
make docker-plot_grid
5753
make docker-report
5854
fi
5955
60-
# Prepare release directory
6156
- name: Prepare release directory
62-
if: ${{ github.event_name == 'workflow_dispatch' || env.RUN_PIPELINE == 'true' }}
6357
run: |
6458
mkdir -p public
6559
cp report/bet-2026.pdf public/ || true
6660
cp plot/plots_sens.html public/ || true
6761
cp plot/plots_grid.html public/ || true
6862
69-
# Deploy outputs to GitHub Pages
7063
- name: Deploy to GitHub Pages
71-
if: ${{ github.event_name == 'workflow_dispatch' || env.RUN_PIPELINE == 'true' }}
7264
uses: peaceiris/actions-gh-pages@v3
7365
with:
7466
github_token: ${{ secrets.GITHUB_TOKEN }}
7567
publish_dir: ./public
7668

77-
# Create a unique version tag
7869
- name: Create version tag
79-
if: ${{ github.event_name == 'workflow_dispatch' || env.RUN_PIPELINE == 'true' }}
8070
id: tag
8171
run: |
8272
DATE=$(date +'%Y%m%d')
8373
BASE_TAG="v${DATE}"
84-
8574
git fetch --tags
86-
8775
EXISTING_COUNT=$(git tag -l "${BASE_TAG}*" | wc -l)
88-
8976
if [ "$EXISTING_COUNT" -eq 0 ]; then
9077
TAG="$BASE_TAG"
9178
else
9279
TAG="${BASE_TAG}-$((EXISTING_COUNT+1))"
9380
fi
94-
9581
echo "tag=$TAG" >> $GITHUB_OUTPUT
9682
git tag "$TAG"
9783
git push origin "$TAG"
9884
99-
# Create GitHub Release
10085
- name: Create GitHub Release
101-
if: ${{ github.event_name == 'workflow_dispatch' || env.RUN_PIPELINE == 'true' }}
10286
uses: softprops/action-gh-release@v1
10387
with:
10488
tag_name: ${{ steps.tag.outputs.tag }}
@@ -110,8 +94,8 @@ jobs:
11094
11195
**View online:**
11296
- [Sensitivity Plots](https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/plots_sens.html)
113-
- [Grid Plots](https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/plots_grid.html)
114-
- [PDF Report](https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/bet-2026.pdf)
97+
- [Grid Plots](https://${{ github.repository_owner }}.github.io/${{ github.repository.name }}/plots_grid.html)
98+
- [PDF Report](https://${{ github.repository_owner }}.github.io/${{ github.repository.name }}/bet-2026.pdf)
11599
files: |
116100
report/bet-2026.pdf
117101
plot/plots_sens.html

0 commit comments

Comments
 (0)