Skip to content

Commit 4de0a0e

Browse files
authored
Update README.md
1 parent cec4811 commit 4de0a0e

File tree

1 file changed

+23
-9
lines changed

1 file changed

+23
-9
lines changed

README.md

+23-9
Original file line numberDiff line numberDiff line change
@@ -523,11 +523,7 @@ If the argument to the `zx` executable starts with `https://`, the file will be
523523
downloaded and executed.
524524

525525
```bash
526-
zx https://medv.io/example-script.mjs
527-
```
528-
529-
```bash
530-
zx https://medv.io/game-of-life.mjs
526+
zx https://medv.io/game-of-life.js
531527
```
532528

533529
### Executing scripts from stdin
@@ -546,10 +542,28 @@ By default `child_process` does not include aliases and bash functions.
546542
But you are still able to do it by hand. Just attach necessary directives to `$.prefix`.
547543

548544
```js
549-
{
550-
$.prefix += 'export NVM_DIR=$HOME/.nvm; source $NVM_DIR/nvm.sh; '
551-
await $`nvm -v`
552-
}
545+
$.prefix += 'export NVM_DIR=$HOME/.nvm; source $NVM_DIR/nvm.sh; '
546+
await $`nvm -v`
547+
```
548+
549+
### Using GitHub Actions
550+
551+
Default GitHub Action runner comes with npx installed.
552+
553+
```yaml
554+
jobs:
555+
build:
556+
runs-on: ubuntu-latest
557+
steps:
558+
- uses: actions/checkout@v3
559+
560+
- name: Build
561+
env:
562+
FORCE_COLOR: 3
563+
run: |
564+
npx zx <<'EOF'
565+
await $`...`
566+
EOF
553567
```
554568

555569
## License

0 commit comments

Comments
 (0)