Skip to content

Commit 6205629

Browse files
authored
MAINT: Phase 1 - Add HTML archives to GitHub release assets (#15)
* Add Persian translation of functions lecture - Translate functions.md from English to Persian - Update _toc.yml to include functions lecture - Maintain all code examples and technical syntax - Preserve right-to-left (RTL) formatting for Persian text * Remove -W flag from CI build to allow warnings - Changed from treating warnings as errors to allowing warnings - This enables preview builds to complete successfully - Kept -n (nitpick) and --keep-going flags for better error reporting * MAINT: Phase 1 - Add HTML archives to GitHub release assets Implements Phase 1: HTML archive backup on releases. ## Changes This commit adds steps to the publish.yml workflow to create and upload HTML archives as GitHub release assets: 1. Create HTML archive - Compresses _build/html/ into a .tar.gz archive after the HTML build 2. Generate checksum - Creates SHA256 hash for integrity verification (html-checksum.txt) 3. Create manifest - Generates metadata file with build information (html-manifest.json) 4. Upload to release - Attaches all three files to the GitHub release using softprops/action-gh-release@v1 ## Release Assets Created Each publish-* tag will now include: • 📦 lecture-python-programming-fa-html-{tag}.tar.gz - Full HTML site archive • 🔐 html-checksum.txt - SHA256 verification file • 📋 html-manifest.json - Build metadata (tag, commit, timestamp, size, file count) ## Key Features • ✅ Does not modify _build/html/ directory (gh-pages deployment unaffected) • ✅ Preserves existing release notes (no body override) • ✅ Automatic tag detection from workflow context • ✅ Creates safety net before Phase 2 (gh-pages history cleanup)
1 parent 0772596 commit 6205629

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
@@ -77,6 +77,32 @@ jobs:
7777
shell: bash -l {0}
7878
run: |
7979
jb build lectures --path-output ./ -n -W --keep-going
80+
# Create HTML archive for release assets
81+
- name: Create HTML archive
82+
shell: bash -l {0}
83+
run: |
84+
tar -czf lecture-python-programming-fa-html-${{ github.ref_name }}.tar.gz -C _build/html .
85+
sha256sum lecture-python-programming-fa-html-${{ github.ref_name }}.tar.gz > html-checksum.txt
86+
87+
# Create metadata manifest
88+
cat > html-manifest.json << EOF
89+
{
90+
"tag": "${{ github.ref_name }}",
91+
"commit": "${{ github.sha }}",
92+
"timestamp": "$(date -Iseconds)",
93+
"size_mb": $(du -sm _build/html | cut -f1),
94+
"file_count": $(find _build/html -type f | wc -l)
95+
}
96+
EOF
97+
- name: Upload archives to release
98+
uses: softprops/action-gh-release@v1
99+
with:
100+
files: |
101+
lecture-python-programming-fa-html-${{ github.ref_name }}.tar.gz
102+
html-checksum.txt
103+
html-manifest.json
104+
env:
105+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80106
- name: Deploy website to gh-pages
81107
uses: peaceiris/actions-gh-pages@v4
82108
with:

0 commit comments

Comments
 (0)