Run a Command
The Sitequest-Software/sitequest-exec-action GitHub Action executes a single shell command on a webspace or VPS via the Sitequest REST API. Stdout, stderr, exit code, and duration are captured and exposed as outputs.
Use it for migrations, cache clears, deploy hooks, or any one-shot operation that doesn't need its own action.
Inputs
| Input | Required | Default | Description |
|---|---|---|---|
api-key |
Yes | — | Sitequest API key with vps:manage and/or webspace:manage scope. |
resource |
Yes | — | Target resource type — vps or webspace. |
id |
Yes | — | Resource ID (VPS or webspace). |
command |
Yes | — | Shell command to run. Multi-line strings are passed verbatim. |
cwd |
No | — | Working directory to execute the command in. |
timeout |
No | 300 |
Execution timeout in seconds (max 1800). |
fail-on-non-zero |
No | true |
Fail the step when the remote exit code is non-zero. |
api-base |
No | https://panel.site.quest |
Override the API base URL (for staging). |
Outputs
| Output | Description |
|---|---|
exit-code |
Remote exit code (-1 if the request itself failed). |
stdout |
Captured stdout from the remote command. |
stderr |
Captured stderr from the remote command. |
duration-ms |
End-to-end duration in milliseconds. |
Example: post-deploy migration
- uses: Sitequest-Software/sitequest-deploy-webspace-action@v1
with:
api-key: ${{ secrets.SITEQUEST_API_KEY }}
webspace-id: ${{ vars.SITEQUEST_WEBSPACE_ID }}
source: build
- name: Run migrations
uses: Sitequest-Software/sitequest-exec-action@v1
with:
api-key: ${{ secrets.SITEQUEST_API_KEY }}
resource: webspace
id: ${{ vars.SITEQUEST_WEBSPACE_ID }}
command: php artisan migrate --force
cwd: public_html
Example: restart a systemd unit on a VPS
- uses: Sitequest-Software/sitequest-exec-action@v1
with:
api-key: ${{ secrets.SITEQUEST_API_KEY }}
resource: vps
id: ${{ vars.SITEQUEST_VPS_ID }}
command: systemctl restart myapp.service
Example: capture output for the next step
- id: status
uses: Sitequest-Software/sitequest-exec-action@v1
with:
api-key: ${{ secrets.SITEQUEST_API_KEY }}
resource: vps
id: ${{ vars.SITEQUEST_VPS_ID }}
command: systemctl is-active myapp.service
fail-on-non-zero: false
- run: |
echo "Service status: ${{ steps.status.outputs.stdout }}"
echo "Exit code: ${{ steps.status.outputs.exit-code }}"
Limits
- Stdout and stderr are each capped at 32 MB per execution.
- Default timeout is 5 minutes; max is 30 minutes.
- The command runs as the webspace user (for webspaces) or
root(for VPS).
Required scope
vps:manage for VPS targets, webspace:manage for webspace targets.
See also
- API reference: VPS Execute, Webspace Execute.