Skip to content

Commit 7716473

Browse files
authored
Merge pull request #6 from auggie-lahey/main
Update CDN URLs to use HTTPS
2 parents 7f02328 + 3e8433e commit 7716473

2 files changed

Lines changed: 38 additions & 24 deletions

File tree

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ Deploy static websites to Blossom/Nostr in a Github Actions Workflow, powered by
3030
relays: |
3131
wss://relay.nsite.lol
3232
servers: |
33-
wss://cdn.hzrd149.com
34-
wss://cdn.sovbit.host
33+
https://cdn.hzrd149.com
34+
https://cdn.sovbit.host
3535
```
3636
3737
## Inputs
@@ -48,6 +48,9 @@ Deploy static websites to Blossom/Nostr in a Github Actions Workflow, powered by
4848
| `verbose` | No | false | Show detailed output |
4949
| `concurrency` | No | 4 | Number of parallel uploads |
5050
| `fallback` | No | '' | Fallback HTML path (e.g., "/index.html") |
51+
| `publish_server_list` | No | false | use this for new/fresh npubs without blossom servers configured |
52+
| `publish_relay_list` | No | false | use this for new/fresh npubs without relays configured |
53+
| `publish_profile` | No | false | use this for new/fresh npubs without a profile configured |
5154

5255
## Outputs
5356

action.yml

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'nsite Action'
1+
name: 'nsyte action'
22
description: 'Deploys static website files to Blossom/Nostr using the nsyte CLI.'
33
author: 'nsite-action Developers'
44

@@ -11,32 +11,32 @@ inputs:
1111
description: 'The nbunksec string for authentication via NIP-46 bunker. Store this as a GitHub Secret.'
1212
required: true
1313
directory:
14-
description: 'The directory containing the static files to upload.'
14+
description: 'The directory containing the static files to deploy.'
1515
required: true
1616
relays:
1717
description: 'YAML array of Nostr relay WebSocket URIs to publish the site event to. Example: ["wss://relay1.example.com", "wss://relay2.example.com"]'
1818
required: true
1919
servers:
20-
description: 'YAML array of Blossom server WebSocket URIs to upload files to. Example: ["wss://server1.example.com", "wss://server2.example.com"]'
20+
description: 'YAML array of Blossom server WebSocket URIs to deploy files to. Example: ["wss://server1.example.com", "wss://server2.example.com"]'
2121
required: true
2222
force:
23-
description: 'Corresponds to the --force flag in nsyte upload. Re-upload all files.'
23+
description: 'Corresponds to the --force flag in nsyte deploy. Re-deploy all files.'
2424
required: false
2525
default: 'false'
2626
purge:
27-
description: 'Corresponds to the --purge flag in nsyte upload. Delete remote files not present locally.'
27+
description: 'Corresponds to the --purge flag in nsyte deploy. Delete remote files not present locally.'
2828
required: false
2929
default: 'false'
3030
verbose:
31-
description: 'Corresponds to the --verbose flag in nsyte upload. Show detailed output.'
31+
description: 'Corresponds to the --verbose flag in nsyte deploy. Show detailed output.'
3232
required: false
3333
default: 'false'
3434
concurrency:
35-
description: 'Corresponds to the --concurrency flag in nsyte upload. Number of parallel uploads.'
35+
description: 'Corresponds to the --concurrency flag in nsyte deploy. Number of parallel deploys.'
3636
required: false
3737
default: '4'
3838
fallback:
39-
description: 'Corresponds to the --fallback flag in nsyte upload. Path to the fallback HTML file (e.g., /index.html for SPAs).'
39+
description: 'Corresponds to the --fallback flag in nsyte deploy. Path to the fallback HTML file (e.g., /index.html for SPAs).'
4040
required: false
4141
default: ''
4242
publish_server_list:
@@ -54,7 +54,7 @@ inputs:
5454

5555
outputs:
5656
status:
57-
description: 'Status of the upload operation (e.g., "success").'
57+
description: 'Status of the deploy operation (e.g., "success").'
5858
nsyte_version_used:
5959
description: 'The actual version of nsyte that was downloaded and used.'
6060

@@ -149,8 +149,10 @@ runs:
149149
if [[ "$NSYT_VERSION_FINAL" =~ ^v(.+)$ ]]; then VERSION_NUMBER="${BASH_REMATCH[1]}"; else VERSION_NUMBER="$NSYT_VERSION_FINAL"; fi
150150
echo "Using nsyte tag: $NSYT_VERSION_FINAL (version number for asset: $VERSION_NUMBER)"
151151
# Using ::set-output for version outputs as GITHUB_OUTPUT can be finicky in composite actions
152-
echo "::set-output name=version::${NSYT_VERSION_FINAL}"
153-
echo "::set-output name=version_number::${VERSION_NUMBER}"
152+
#echo "::set-output name=version::${NSYT_VERSION_FINAL}"
153+
#echo "::set-output name=version_number::${VERSION_NUMBER}"
154+
echo "version=${NSYT_VERSION_FINAL}" >> $GITHUB_OUTPUT
155+
echo "version_number=${VERSION_NUMBER}" >> $GITHUB_OUTPUT
154156
155157
- name: Download nsyte
156158
id: download_nsyte
@@ -178,14 +180,16 @@ runs:
178180
fi
179181
chmod +x "nsyte_bin/$ASSET_FILENAME"
180182
# Using ::set-output for nsyte_path
181-
echo "::set-output name=nsyte_path::$(pwd)/nsyte_bin/$ASSET_FILENAME"
183+
#echo "::set-output name=nsyte_path::$(pwd)/nsyte_bin/$ASSET_FILENAME"
184+
echo "nsyte_path=$(pwd)/nsyte_bin/$ASSET_FILENAME" >> $GITHUB_OUTPUT
185+
182186
183187
- name: Build nsyte command
184188
id: build_cmd
185189
shell: bash
186190
run: |
187191
# The -i flag is critical for non-interactive CI environments
188-
CMD="\"${{ steps.download_nsyte.outputs.nsyte_path }}\" upload \"${{ inputs.directory }}\" -i --nbunksec \"${{ inputs.nbunksec }}\""
192+
CMD="\"${{ steps.download_nsyte.outputs.nsyte_path }}\" deploy \"${{ inputs.directory }}\" -i --nbunksec \"${{ inputs.nbunksec }}\""
189193
190194
# Handle relays as newline-separated list
191195
if [[ -n "${{ inputs.relays }}" ]]; then
@@ -212,18 +216,21 @@ runs:
212216
if [[ "${{ inputs.publish_relay_list }}" == "true" ]]; then CMD+=" --publish-relay-list"; fi
213217
if [[ "${{ inputs.publish_profile }}" == "true" ]]; then CMD+=" --publish-profile"; fi
214218
# Using ::set-output for command
215-
echo "::set-output name=command::${CMD}"
219+
#echo "::set-output name=command::${CMD}"
220+
echo "command=${CMD}" >> $GITHUB_OUTPUT
221+
216222
217-
- name: Run nsyte upload
223+
- name: Run nsyte deploy
218224
id: nsyte_run
219225
shell: bash
220226
run: |
221227
set +e # Disable exit on error to manually handle exit codes and ensure outputs are set
222228
NSYT_COMMAND="${{ steps.build_cmd.outputs.command }}"
223229
224230
# Set version used output using ::set-output
225-
echo "::set-output name=nsyte_version_used::${{ steps.version.outputs.version }}"
226-
231+
#echo "::set-output name=nsyte_version_used::${{ steps.version.outputs.version }}"
232+
echo "nsyte_version_used=${{ steps.version.outputs.version }}" >> $GITHUB_OUTPUT
233+
227234
echo "Executing nsyte command (secrets masked):"
228235
MASKED_COMMAND=$(echo "$NSYT_COMMAND" | \
229236
sed -e "s/--nbunksec \"[^\"]*\"/--nbunksec \"***MASKED***\"/" \
@@ -233,14 +240,18 @@ runs:
233240
234241
eval "$NSYT_COMMAND"
235242
COMMAND_EXIT_CODE=$? # Capture the exit code of the nsyte command
243+
echo COMMAND_EXIT_CODE=$?
236244
237245
if [[ $COMMAND_EXIT_CODE -eq 0 ]]; then
238-
echo "nsyte upload completed successfully."
239-
echo "::set-output name=status::success"
246+
echo "nsyte deploy completed successfully."
247+
#echo "::set-output name=status::success"
248+
echo "status=success" >> $GITHUB_OUTPUT
249+
240250
else
241-
echo "::error::nsyte upload command failed with exit code $COMMAND_EXIT_CODE." # Log the error
242-
echo "::set-output name=status::failure"
251+
echo "::error::nsyte deploy command failed with exit code $COMMAND_EXIT_CODE." # Log the error
252+
#echo "::set-output name=status::failure"
253+
echo "status=failure" >> $GITHUB_OUTPUT
243254
# This script step itself should still exit 0 to ensure outputs are processed.
244255
# The calling workflow (test.yml) has continue-on-error: true and will check the 'status' output.
245256
fi
246-
exit 0 # Explicitly exit 0 for this script step
257+
exit 0 # Explicitly exit 0 for this script step

0 commit comments

Comments
 (0)