diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 35b1473..ea5c1b5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -77,6 +77,32 @@ jobs: shell: bash -l {0} run: | jb build lectures --path-output ./ -n -W --keep-going + # Create HTML archive for release assets + - name: Create HTML archive + shell: bash -l {0} + run: | + tar -czf lecture-python-programming-fa-html-${{ github.ref_name }}.tar.gz -C _build/html . + sha256sum lecture-python-programming-fa-html-${{ github.ref_name }}.tar.gz > html-checksum.txt + + # Create metadata manifest + cat > html-manifest.json << EOF + { + "tag": "${{ github.ref_name }}", + "commit": "${{ github.sha }}", + "timestamp": "$(date -Iseconds)", + "size_mb": $(du -sm _build/html | cut -f1), + "file_count": $(find _build/html -type f | wc -l) + } + EOF + - name: Upload archives to release + uses: softprops/action-gh-release@v1 + with: + files: | + lecture-python-programming-fa-html-${{ github.ref_name }}.tar.gz + html-checksum.txt + html-manifest.json + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Deploy website to gh-pages uses: peaceiris/actions-gh-pages@v4 with: