Skip to content

Commit

Permalink
fix pathing and list site contents (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattnite authored Nov 7, 2024
1 parent 9078804 commit 32a76b7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/publish-github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ jobs:
echo "Processing release: $release"
# Create the target directory if it doesn't exist
mkdir -p zig-out/www/downloads/microzig
mkdir -p website/zig-out/www/downloads/microzig
# Download the artifact 'boxzer-out.tar.gz' if it exists
gh release download "$release" --pattern "boxzer-out.tar.gz" --repo ${{ github.repository }} --dir . || echo "Failed to download boxzer-out.tar.gz"
# Check if the tarball was downloaded and unpack it
if [ -f "boxzer-out.tar.gz" ]; then
echo "Unpacking boxzer-out.tar.gz for release: $release"
tar -xzvf boxzer-out.tar.gz -C zig-out/www/downloads/microzig
tar -xzvf boxzer-out.tar.gz -C website/zig-out/www/downloads/microzig
rm boxzer-out.tar.gz
# Add the release to the metadata array
Expand All @@ -63,7 +63,10 @@ jobs:
# Generate metadata.json file
echo "Generating metadata.json"
echo "{ \"releases\": [$(IFS=,; echo "${releases_with_artifact[*]}")] }" > zig-out/www/downloads/microzig/metadata.json
echo "{ \"releases\": [$(IFS=,; echo "${releases_with_artifact[*]}")] }" > website/zig-out/www/downloads/microzig/metadata.json
echo "List of files uploaded to github pages:"
tree website/zig-out/www
- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
Expand Down

0 comments on commit 32a76b7

Please sign in to comment.