Skip to content

Commit 849d421

Browse files
author
William DeMeo
committed
bugfix: prevent deletion of flake.nix during CI
1 parent 93626a1 commit 849d421

File tree

1 file changed

+26
-7
lines changed

1 file changed

+26
-7
lines changed

.github/workflows/build.yml

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,23 +83,33 @@ jobs:
8383

8484
# !!! MODIFIED PDF JOBS !!!
8585
# We now inline build steps and check out 'legacy-latex' branch to ensure PDF is
86-
# built from correct LaTeX source files.
86+
# built from correct LaTeX source files; also, checkout logic is updated to prevent
87+
# deletion of flake.nix.
8788

8889
cardano-ledger-pdf:
8990
needs: [formal-ledger-agda]
9091
runs-on: ubuntu-latest
9192
steps:
9293
- name: Checkout repo with build scripts (e.g., master-markdown)
9394
uses: actions/checkout@v4
94-
- name: Replace src with legacy LaTeX sources
95+
96+
- name: Checkout legacy 'src' directory
9597
uses: actions/checkout@v4
9698
with:
97-
# check out legacy-latex branch
99+
# Check out the legacy-latex branch
98100
ref: 'legacy-latex'
99-
# only get 'src' directory
101+
# Check it out into a temporary subdirectory
102+
path: 'legacy-temp'
103+
# Only get the 'src' directory from that branch
100104
sparse-checkout: |
101105
src
102106
sparse-checkout-cone-mode: false
107+
108+
- name: Replace src with legacy version
109+
run: |
110+
rm -rf ./src
111+
mv ./legacy-temp/src ./src
112+
103113
- name: Download agda _build artifact
104114
uses: actions/download-artifact@v4
105115
with:
@@ -127,15 +137,24 @@ jobs:
127137
steps:
128138
- name: Checkout repo with build scripts (e.g., master-markdown)
129139
uses: actions/checkout@v4
130-
- name: Replace src with legacy LaTeX sources
140+
141+
- name: Checkout legacy 'src' directory
131142
uses: actions/checkout@v4
132143
with:
133-
# check out legacy-latex branch
144+
# Check out the legacy-latex branch
134145
ref: 'legacy-latex'
135-
# only get 'src' directory
146+
# Check it out into a temporary subdirectory
147+
path: 'legacy-temp'
148+
# Only get the 'src' directory from that branch
136149
sparse-checkout: |
137150
src
138151
sparse-checkout-cone-mode: false
152+
153+
- name: Replace src with legacy version
154+
run: |
155+
rm -rf ./src
156+
mv ./legacy-temp/src ./src
157+
139158
- name: Download agda _build artifact
140159
uses: actions/download-artifact@v4
141160
with:

0 commit comments

Comments
 (0)