Skip to content

Commit 53b0906

Browse files
committed
fix formatting
1 parent 4a2e2cf commit 53b0906

File tree

1 file changed

+41
-42
lines changed

1 file changed

+41
-42
lines changed

action.yml

Lines changed: 41 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
22
name: Netlify Deploy Site
33
author: Data Intuitive
4-
description: |
5-
Deploy a site to Netlify.
4+
description: Deploy a site to Netlify.
65
inputs:
76
auth:
87
description: Netlify auth token to deploy with. Generate the auth token [here](https://app.netlify.com/user/applications#personal-access-tokens).
@@ -44,53 +43,53 @@ outputs:
4443
runs:
4544
using: composite
4645
steps:
47-
- shell: bash
48-
id: netlify-deploy
49-
env:
50-
NETLIFY_AUTH_TOKEN: ${{ inputs.NETLIFY_AUTH_TOKEN }}
51-
NETLIFY_SITE_ID: ${{ inputs.NETLIFY_SITE_ID }}
52-
run: |
53-
ARGS=()
54-
55-
# process auth
56-
if [[ -n "${{ inputs.auth }}" ]]; then
57-
ARGS+=("--auth=${{ inputs.auth }}")
58-
fi
46+
- shell: bash
47+
id: netlify-deploy
48+
env:
49+
NETLIFY_AUTH_TOKEN: ${{ inputs.NETLIFY_AUTH_TOKEN }}
50+
NETLIFY_SITE_ID: ${{ inputs.NETLIFY_SITE_ID }}
51+
run: |
52+
ARGS=()
53+
54+
# process auth
55+
if [[ -n "${{ inputs.auth }}" ]]; then
56+
ARGS+=("--auth=${{ inputs.auth }}")
57+
fi
5958
60-
# process prod and alias
61-
if [[ "${{ inputs.prod }}" == "true" ]]; then
62-
ARGS+=("--prod")
63-
elif [[ -n "${{ inputs.alias }}" ]]; then
64-
ARGS+=("--alias=${{ inputs.alias }}")
65-
fi
59+
# process prod and alias
60+
if [[ "${{ inputs.prod }}" == "true" ]]; then
61+
ARGS+=("--prod")
62+
elif [[ -n "${{ inputs.alias }}" ]]; then
63+
ARGS+=("--alias=${{ inputs.alias }}")
64+
fi
6665
67-
# process dir
68-
if [[ -n "${{ inputs.dir }}" ]]; then
69-
ARGS+=("--dir=${{ inputs.dir }}")
70-
fi
66+
# process dir
67+
if [[ -n "${{ inputs.dir }}" ]]; then
68+
ARGS+=("--dir=${{ inputs.dir }}")
69+
fi
7170
72-
# process message
73-
if [[ -n "${{ inputs.message }}" ]]; then
74-
ARGS+=("--message=${{ inputs.message }}")
75-
fi
71+
# process message
72+
if [[ -n "${{ inputs.message }}" ]]; then
73+
ARGS+=("--message=${{ inputs.message }}")
74+
fi
7675
77-
# process site
78-
if [[ -n "${{ inputs.site }}" ]]; then
79-
ARGS+=("--site=${{ inputs.site }}")
80-
fi
76+
# process site
77+
if [[ -n "${{ inputs.site }}" ]]; then
78+
ARGS+=("--site=${{ inputs.site }}")
79+
fi
8180
82-
# process timeout
83-
if [[ -n "${{ inputs.timeout }}" ]]; then
84-
ARGS+=("--timeout=${{ inputs.timeout }}")
85-
fi
81+
# process timeout
82+
if [[ -n "${{ inputs.timeout }}" ]]; then
83+
ARGS+=("--timeout=${{ inputs.timeout }}")
84+
fi
8685
87-
TEMP_JSON="${{runner.temp}}/output.json"
88-
netlify deploy --json --debug "${ARGS[@]}" | tee "$TEMP_JSON"
86+
TEMP_JSON="${{runner.temp}}/output.json"
87+
netlify deploy --json --debug "${ARGS[@]}" | tee "$TEMP_JSON"
8988
90-
jq -r '"site-name=" + .site_name' "$TEMP_JSON" >> $GITHUB_OUTPUT
91-
jq -r '"deploy-id=" + .deploy_id' "$TEMP_JSON" >> $GITHUB_OUTPUT
92-
jq -r '"deploy-url=" + .deploy_url' "$TEMP_JSON" >> $GITHUB_OUTPUT
93-
jq -r '"logs=" + .logs' "$TEMP_JSON" >> $GITHUB_OUTPUT
89+
jq -r '"site-name=" + .site_name' "$TEMP_JSON" >> $GITHUB_OUTPUT
90+
jq -r '"deploy-id=" + .deploy_id' "$TEMP_JSON" >> $GITHUB_OUTPUT
91+
jq -r '"deploy-url=" + .deploy_url' "$TEMP_JSON" >> $GITHUB_OUTPUT
92+
jq -r '"logs=" + .logs' "$TEMP_JSON" >> $GITHUB_OUTPUT
9493
9594
branding:
9695
icon: arrow-up-circle

0 commit comments

Comments
 (0)