Skip to content

Commit 0128c9b

Browse files
committed
fix for github actions filenotfound in docs
1 parent 910fe7c commit 0128c9b

File tree

1 file changed

+38
-42
lines changed

1 file changed

+38
-42
lines changed

.github/workflows/ci.yml

Lines changed: 38 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -31,46 +31,42 @@ jobs:
3131
zig build bench
3232
3333
docs:
34-
needs: test
35-
if: github.ref == 'refs/heads/main'
36-
runs-on: ubuntu-latest
37-
permissions:
38-
contents: write
39-
40-
steps:
41-
- uses: actions/checkout@v4
42-
43-
- name: Setup Zig
44-
uses: goto-bus-stop/setup-zig@v2
45-
with:
46-
version: 0.13.0
47-
48-
- name: Generate Documentation
49-
run: |
50-
echo "Starting documentation generation..."
51-
mkdir -p docs
52-
53-
# Get zig lib directory
54-
ZIG_LIB_DIR="$(zig env | grep lib_dir | cut -d'"' -f2)"
55-
echo "Zig lib directory: $ZIG_LIB_DIR"
56-
57-
# Generate docs
58-
zig test --zig-lib-dir "$ZIG_LIB_DIR" -femit-docs src/root.zig
59-
60-
echo "Looking for generated docs..."
61-
find . -name "*.html"
62-
63-
# Move any generated HTML files to docs directory
64-
mv *.html docs/ 2>/dev/null || echo "No HTML files to move"
65-
66-
echo "Final docs directory contents:"
67-
ls -la docs/
34+
needs: test
35+
if: github.ref == 'refs/heads/main'
36+
runs-on: ubuntu-latest
37+
permissions:
38+
contents: write
39+
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- name: Setup Zig
44+
uses: goto-bus-stop/setup-zig@v2
45+
with:
46+
version: 0.13.0
47+
48+
- name: Generate Documentation
49+
run: |
50+
echo "Starting documentation generation..."
51+
mkdir -p docs
52+
53+
# Simple direct approach
54+
zig build-lib src/root.zig -femit-docs
55+
56+
echo "Looking for generated docs..."
57+
find . -name "*.html"
58+
59+
# Move any generated HTML files to docs directory
60+
mv *.html docs/ 2>/dev/null || echo "No HTML files to move"
61+
62+
echo "Final docs directory contents:"
63+
ls -la docs/
6864
69-
- name: Deploy to GitHub Pages
70-
uses: peaceiris/actions-gh-pages@v3
71-
if: success()
72-
with:
73-
github_token: ${{ secrets.GITHUB_TOKEN }}
74-
publish_dir: ./docs
75-
force_orphan: true
76-
commit_message: "docs: update documentation [skip ci]"
65+
- name: Deploy to GitHub Pages
66+
uses: peaceiris/actions-gh-pages@v3
67+
if: success()
68+
with:
69+
github_token: ${{ secrets.GITHUB_TOKEN }}
70+
publish_dir: ./docs
71+
force_orphan: true
72+
commit_message: "docs: update documentation [skip ci]"

0 commit comments

Comments
 (0)