Skip to content

Commit f0eeee8

Browse files
authored
Add HTML archive to release assets (Phase 1) (#372)
1 parent 25246d5 commit f0eeee8

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/publish.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,32 @@ jobs:
7575
shell: bash -l {0}
7676
run: |
7777
jb build lectures --path-output ./
78+
# Create HTML archive for release assets
79+
- name: Create HTML archive
80+
shell: bash -l {0}
81+
run: |
82+
tar -czf lecture-julia-html-${{ github.ref_name }}.tar.gz -C _build/html .
83+
sha256sum lecture-julia-html-${{ github.ref_name }}.tar.gz > html-checksum.txt
84+
85+
# Create metadata manifest
86+
cat > html-manifest.json << EOF
87+
{
88+
"tag": "${{ github.ref_name }}",
89+
"commit": "${{ github.sha }}",
90+
"timestamp": "$(date -Iseconds)",
91+
"size_mb": $(du -sm _build/html | cut -f1),
92+
"file_count": $(find _build/html -type f | wc -l)
93+
}
94+
EOF
95+
- name: Upload archives to release
96+
uses: softprops/action-gh-release@v2
97+
with:
98+
files: |
99+
lecture-julia-html-${{ github.ref_name }}.tar.gz
100+
html-checksum.txt
101+
html-manifest.json
102+
env:
103+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78104
- name: Deploy website to gh-pages
79105
uses: peaceiris/actions-gh-pages@v4
80106
with:

0 commit comments

Comments
 (0)