### Bug description

# Bug description

Running ``quarto publish gh-pages`` when ``output-dir`` is specified in ``_quarto.yml`` fails with error:

```sh
ERROR: NotFound: No such file or directory (os error 2)
```

# Minimal working example

Create a new project with
```sh
quarto create-project foo
```
and initialize it with a git repository
```sh
cd foo/
git init
git add .
git commit -m "Initial commit"
```
and set a remote for the repository.

Create an orphan ``gh-pages`` branch
```sh
git checkout --orphan gh-pages
git reset --hard
git commit --allow-empty -m "Initialising gh-pages branch"
git push origin gh-pages
```

Edit the ``_quarto.yml`` file so that
```yaml
project:
  title: "foo"
  output-dir: "_output"
```

Running ``quarto publish`` yields:
```
$ quarto --version
1.2.313
$ quarto publish gh-pages --no-browser
From github.com:dkubek/test
 * branch            gh-pages   -> FETCH_HEAD
Rendering for publish:

pandoc
  to: html
  output-file: foo.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
  title: foo

ERROR: NotFound: No such file or directory (os error 2)
```

Also tried running with the pre-release
```
$ quarto --version
1.3.142
$ quarto publish gh-pages --no-browser
From github.com:dkubek/test
 * branch            gh-pages   -> FETCH_HEAD
Rendering for publish:

pandoc
  to: html
  output-file: foo.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
  title: foo

ERROR: NotFound: No such file or directory (os error 2), stat '/home/dkubek/devel/foo/foo.html'
```

# OS information

```sh
$ uname -a
Linux fedora 6.1.7-100.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jan 18 18:37:43 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
```



### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [ ] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
dragonstyle
2023-01-31T10:30:04Z
dkubek
bug
v1.3
closed
Quarto publish fails when project ``output-dir`` is specified
https://github.com/quarto-dev/quarto-cli/issues/4158