Skip to content

Commit aac2a00

Browse files
committed
git: update workflow trigger for site & docs
1 parent 556c0c3 commit aac2a00

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

.github/workflows/docs.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,10 @@ jobs:
151151
if: |
152152
github.event_name == 'pull_request' ||
153153
github.event_name == 'push' ||
154+
github.event_name == 'workflow_dispatch' ||
154155
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
155156
outputs:
156-
has_changes: ${{ steps.check_changes.outputs.has_changes || github.event_name == 'workflow_run' }}
157+
has_changes: ${{ steps.check_changes.outputs.has_changes || github.event_name == 'workflow_run' || github.event_name == 'workflow_dispatch' }}
157158
steps:
158159
- name: 📥 Checkout repository
159160
uses: actions/checkout@v4

.github/workflows/formal-spec-listener.yaml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010
name: "Process Formal Spec Update"
1111
runs-on: ubuntu-latest
1212
outputs:
13-
spec_updated: 'true'
13+
spec_updated: "true"
1414
steps:
1515
- name: 📥 Checkout repository
1616
uses: actions/checkout@v4
17-
17+
1818
# First try to download previous artifacts to have as fallback
1919
- name: 📥 Download previous formal spec HTML for fallback
2020
id: download_previous
@@ -24,7 +24,7 @@ jobs:
2424
name: formal-spec-html
2525
path: previous-formal-spec-html
2626
if_no_artifact_found: ignore
27-
27+
2828
- name: Check previous artifacts
2929
id: check_previous
3030
run: |
@@ -36,22 +36,27 @@ jobs:
3636
echo "has_previous=false" >> $GITHUB_OUTPUT
3737
fi
3838
39+
# Try to download directly from GitHub API to see artifacts in the formal-spec repo
40+
- name: List available artifacts in formal-spec repo
41+
run: |
42+
curl -s -H "Authorization: token ${{ secrets.FORMAL_SPEC_PAT || github.token }}" \
43+
"https://api.github.com/repos/input-output-hk/ouroboros-leios-formal-spec/actions/artifacts" | \
44+
jq '.artifacts[] | {name: .name, id: .id, created_at: .created_at, expired: .expired}' || true
45+
3946
- name: 📥 Download formal spec HTML
4047
id: download_new
41-
uses: actions/download-artifact@v4
48+
uses: dawidd6/action-download-artifact@v2
4249
continue-on-error: true
4350
with:
44-
workflow: formal-spec.yaml
45-
workflow_conclusion: success
4651
name: formal-spec-html
4752
repo: input-output-hk/ouroboros-leios-formal-spec
48-
token: ${{ github.token }}
4953
path: new-formal-spec-html
50-
54+
token: ${{ secrets.FORMAL_SPEC_PAT || github.token }}
55+
5156
- name: Prepare final formal spec HTML
5257
run: |
5358
mkdir -p formal-spec-html
54-
59+
5560
# Check if we successfully downloaded new files
5661
if [ -d "new-formal-spec-html" ] && [ -n "$(ls -A new-formal-spec-html 2>/dev/null)" ]; then
5762
echo "Using newly downloaded formal spec HTML"
@@ -65,7 +70,7 @@ jobs:
6570
echo "No formal spec HTML available, creating placeholder"
6671
echo "<html><body><h1>Formal Specification</h1><p>Formal specification documentation is being updated. Please check back later.</p></body></html>" > formal-spec-html/index.html
6772
fi
68-
73+
6974
# Show what we're using
7075
echo "Final formal spec HTML contents:"
7176
ls -la formal-spec-html/
@@ -76,10 +81,10 @@ jobs:
7681
name: formal-spec-html
7782
path: formal-spec-html
7883
retention-days: 1
79-
84+
8085
# Trigger the docs workflow to build and publish
8186
- name: Trigger docs workflow
8287
uses: benc-uk/workflow-dispatch@v1
8388
with:
8489
workflow: docs.yaml
85-
token: ${{ github.token }}
90+
token: ${{ github.token }}

0 commit comments

Comments
 (0)