Update Actions as ChatGPT recommended
Some checks failed
Build and Save Artifact / build (push) Failing after 9s

This commit is contained in:
Cyanoure
2024-09-15 16:30:38 +02:00
parent da25dac794
commit f37033a178

View File

@ -27,8 +27,10 @@ jobs:
# Initialize build branch
- name: Initialize build branch
run: |
git switch ${GITHUB_REF_NAME}-build || git branch ${GITHUB_REF_NAME}-build && git switch ${GITHUB_REF_NAME}-build
git merge ${GITHUB_REF_NAME}
BRANCH_NAME="${GITHUB_REF_NAME}-build"
git fetch origin $BRANCH_NAME || true # Allow failure if branch doesn't exist
git switch $BRANCH_NAME || git switch -c $BRANCH_NAME
git merge --no-ff ${GITHUB_REF_NAME}
rm -rf dist
# Install dependencies
@ -44,8 +46,9 @@ jobs:
run: |
git config --global user.name 'Git Bot'
git config --global user.email 'noreply@kozelkaricsi.hu'
git add -f dist && git commit -am "Build"
git push --set-upstream origin ${GITHUB_REF_NAME}-build --force
git add -f dist
git commit -am "Build"
git push origin HEAD --force # Push to the current branch
# Upload the build directory as an artifact
- name: Upload build artifact