Skip to content

Commit 7c2be5a

Browse files
committed
add sudo and improved caching
1 parent f949257 commit 7c2be5a

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

.github/workflows/docs.yaml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ jobs:
4545
# - name: Install clang
4646
# run: sudo apt-get install clang-17 lld-17 libclang-cpp17-dev
4747

48-
- name: Cache HDOC build
49-
id: cache-hdoc
50-
uses: actions/cache@v4
48+
- name: Restore Cache HDOC build
49+
id: cache-hdoc-restore
50+
uses: actions/cache/restore@v4
5151
with:
5252
path: ${{ env.BUILD_HDOC_DIR }}
5353
key: ${{ runner.os }}-hdoc
5454

5555
- name: Build hdoc
56-
if: steps.cache-hdoc.outputs.cache-hit != 'true'
56+
if: steps.cache-hdoc-restore.outputs.cache-hit != 'true'
5757
run: |
5858
mkdir -p ${{ env.BUILD_HDOC_DIR }}
5959
cd ${{ env.BUILD_HDOC_DIR }}
@@ -63,6 +63,14 @@ jobs:
6363
CC=clang-17 CXX=clang++-17 CPP=clang-cpp-17 meson build
6464
sudo ninja -C build
6565
66+
- name: Save Cache HDOC build
67+
id: cache-hdoc-save
68+
uses: actions/cache/save@v4
69+
with:
70+
path: ${{ env.BUILD_HDOC_DIR }}
71+
key: ${{ steps.cache-hdoc-restore.outputs.cache-primary-key }}
72+
73+
6674
- name: Copy hdoc binary
6775
run: |
6876
sudo cp ${{ env.BUILD_HDOC_DIR }}/hdoc/build/hdoc /hdoc
@@ -87,8 +95,8 @@ jobs:
8795
- name: Upload documentation to custom server
8896
run: |
8997
cd hdoc-output
90-
zip -r archive.zip *
91-
curl -X POST \
98+
sudo zip -r archive.zip *
99+
sudo curl -X POST \
92100
-F filedata=@archive.zip \
93101
-F name="TotalyNotRabbitMQ" \
94102
-F version="1.0.0" \

0 commit comments

Comments
 (0)