Skip to content

Commit

Permalink
feat: add test provider to skip deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreytse committed Jul 17, 2023
1 parent 669814e commit f387149
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ jobs:
${{ runner.os }}-gems-
- uses: ./
with:
provider: 'github'
provider: 'test'
token: ${{ secrets.GITHUB_TOKEN }}
jekyll_src: './test_site'
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ cd ${WORKING_DIR}/build

# Check if deploy on the same repository branch
PROVIDER_EXIT_CODE=0
if [[ "${PROVIDER}" == "github" ]]; then
source "${SCRIPT_DIR}/providers/github.sh"
if [[ -f "${SCRIPT_DIR}/providers/${PROVIDER}.sh" ]]; then
source "${SCRIPT_DIR}/providers/${PROVIDER}.sh"
else
echo "${PROVIDER} is an unsupported provider."
PROVIDER_EXIT_CODE=1
Expand Down
7 changes: 7 additions & 0 deletions providers/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
set -e

# Check if deploy to same branch
echo "This is just for deployment test."

PROVIDER_EXIT_CODE=$?

0 comments on commit f387149

Please sign in to comment.