Skip to content

Commit

Permalink
Update static-deployment.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
timomeister authored Nov 7, 2024
1 parent 6771c66 commit 9c1223e
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/static-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,8 @@ jobs:
- name: Determine Deploy Path
id: vars
run: |
if [ "${{ github.ref_type }}" == "branch" ]; then
export DEPLOY_PATH="${{ github.ref_name }}"
elif [ "${{ github.ref_type }}" == "tag" ]; then
export DEPLOY_PATH="releases/${{ github.ref_name }}"
fi
# Use the same DEPLOY_PATH format for both branches and tags
export DEPLOY_PATH="${{ github.ref_name }}"
echo "DEPLOY_PATH=$DEPLOY_PATH" >> $GITHUB_ENV
- name: Prepare Deployment Directory
Expand All @@ -49,12 +46,12 @@ jobs:
- name: Generate Index.html
run: |
INDEX_PATH="public/index.html"
echo "<html><body><h1>Deployed Branches and Releases</h1><ul>" > $INDEX_PATH
echo "<html><body><h1>Deployed Branches and Tags</h1><ul>" > $INDEX_PATH
# Iterate through all directories in 'public' and add to the index
for dir in $(ls -d public/*/); do
DIR_NAME=$(basename "$dir")
echo "<li><a href='/${DIR_NAME}/'>${DIR_NAME}</a></li>" >> $INDEX_PATH
echo "<li><a href='/firstspirit-snap-extension/${DIR_NAME}/'>${DIR_NAME}</a></li>" >> $INDEX_PATH
done
echo "</ul></body></html>" >> $INDEX_PATH
Expand Down

0 comments on commit 9c1223e

Please sign in to comment.