Skip to content

Commit

Permalink
Merge pull request #35 from Alirezaja1384/build-deploy
Browse files Browse the repository at this point in the history
fix(build workflow): deployment check fixed
  • Loading branch information
Alirezaja1384 authored Sep 8, 2024
2 parents 1c2e305 + 3c58771 commit 7c29e49
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,20 @@ jobs:
needs: [build, tag]
steps:
- name: Check if deployment PAT is set
id: deployment_check
run: |
if [ -z "${{ secrets.DEPLOYMENT_PAT }}" ]; then
echo "DEPLOYMENT_PAT is not set. Skipping deployment."
echo "deployment_enabled=false" >> $GITHUB_OUTPUT
exit 0
else
echo "deployment_enabled=true" >> $GITHUB_OUTPUT
echo "deployment_enabled=true" >> $GITHUB_OUTPUT
fi
- name: Update deployment
uses: actions/github-script@v7
if: steps.deployment.outputs.deployment_enabled == 'true'
if: steps.deployment_check.outputs.deployment_enabled == 'true'
with:
github-token: ${{ secrets.DEPLOYMENT_PAT }}
script: |
Expand Down

0 comments on commit 7c29e49

Please sign in to comment.