Skip to content

Commit

Permalink
feat: Deploy workflow should skip if secrets are absent (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjibansg committed Jun 12, 2023
1 parent 75f0d26 commit ef93819
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/deploy-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
if: >
github.ref == 'refs/heads/main' &&
secrets.DEPLOY_SSH_KEY &&
secrets.DEPLOY_HOST_DNS &&
secrets.DEPLOY_USERNAME &&
secrets.DEPLOY_TARGET_DIR
steps:
- uses: actions/checkout@v3
- run: rm -rf .git
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/deploy-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ jobs:

deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
if: >
github.ref == 'refs/heads/main' &&
secrets.DEPLOY_SSH_KEY &&
secrets.DEPLOY_HOST_DNS &&
secrets.DEPLOY_USERNAME &&
secrets.DEPLOY_TARGET_DIR
needs: [build]
steps:
- uses: actions/download-artifact@v3
Expand Down

0 comments on commit ef93819

Please sign in to comment.