```powershell
mkdir tests
cd tests
echo "# test" >> test.qmd
```
Rendering ok 
```powershell 
> quarto render test.qmd
pandoc
  to: html
  output-file: test.html
  standalone: true
  section-divs: true
  html-math-method: mathjax
  wrap: none
  default-image-extension: png

metadata
  document-css: false
  link-citations: true
  date-format: long
  lang: en

Output created: test.html
```

Publishing is not ok 

````powershell
> quarto publish quarto-pub .\test.qmd
? Publish with account christophe.dervieux@gmail.com (Y/n) » Yes
? Publish with name 'test'? (Y/n) » Yes

[>] Creating quarto-pub document

Rendering for publish:

ERROR: The --site-url flag can only be used when rendering projects.

Error: The --site-url flag can only be used when rendering projects.
    at validateDocumentRenderFlags (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/command/render/render-shared.ts:268:15)
    at render (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/command/render/render-shared.ts:98:3)
    at async renderForPublish (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/publish/publish.ts:164:24)
    at async renderForPublish (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/publish/common/publish.ts:248:22)
    at async handlePublish (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/publish/common/publish.ts:117:24)
    at async publishDocument (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/publish/publish.ts:260:36)
    at async publish (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/command/publish/cmd.ts:282:9)
    at async doPublish (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/command/publish/cmd.ts:195:7)
    at async publishAction (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/command/publish/cmd.ts:258:7)
    at async Command.fn (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/command/publish/cmd.ts:153:11)
````

By adding a `_quarto.yml` to make it a project, it works ok 

```powershell
> echo "project:" > _quarto.yml
> echo "  type: default" >> _quarto.yml
> cat .\_quarto.yml
project:
  type: default
>
> quarto publish quarto-pub .\test.qmd
? Publish with account christophe.dervieux@gmail.com (Y/n) » Yes
? Publish with name 'test-29f7'? (Y/n) » Yes

[>] Creating quarto-pub document

Rendering for publish:

pandoc
  to: html
  output-file: test.html
  standalone: true
  section-divs: true
  html-math-method: mathjax
  wrap: none
  default-image-extension: png

metadata
  document-css: false
  link-citations: true
  date-format: long
  lang: en

[>] Preparing to publish document
[>] Uploading files (complete)
[>] Deploying published document
[>] Published document: https://cderv.quarto.pub/test-29f7
[>] Account site updated: https://cderv.quarto.pub
```

**Do no forget to go to https://quarto.pub to remove the testing document published**
2023-02-16T12:11:17Z
cderv
bug publishing
v1.3
closed
publishing to quarto-pub does not work without a Quarto project
https://github.com/quarto-dev/quarto-cli/issues/4384