> ## Documentation Index
> Fetch the complete documentation index at: https://docs.htmldrop.app/llms.txt
> Use this file to discover all available pages before exploring further.

# CI and headless

> Publish from GitHub Actions, a container, or anywhere without a browser.

OAuth needs a browser, so automated environments use an API token instead.

<Steps>
  <Step title="Create a token">
    [Dashboard → Settings → API tokens](https://htmldrop.app/dashboard/settings).
    Tokens look like `hsk_live_…` and are shown once.
  </Step>

  <Step title="Store it as a secret">
    Never commit it. In GitHub Actions, add it under repository
    **Settings → Secrets and variables → Actions**.
  </Step>

  <Step title="Publish in your workflow">
    Use the CLI, or run the MCP server over stdio if an agent is driving.
  </Step>
</Steps>

## GitHub Actions

```yaml theme={null}
name: Publish preview
on:
  push:
    branches: [main]

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '20'
      - run: npm ci && npm run build
      - name: Publish to htmldrop
        env:
          HTMLDROP_API_TOKEN: ${{ secrets.HTMLDROP_API_TOKEN }}
        run: npx @htmldrop.app/cli deploy
        working-directory: dist
```

## MCP over stdio

```bash theme={null}
HTMLDROP_API_TOKEN=$HTMLDROP_API_TOKEN npx -y @htmldrop.app/mcp
```

## Direct API

If you would rather not add a Node dependency, the
[REST API](/api/authentication) takes the same token as a bearer credential.
