Answers: <p>If you are using GitHub addresses for the page, it naturally creates subfolders for additional repositories. You can only choose one repository to be the root.</p>
  <p>Example</p>
  <ul>
  <li>Repo: website <code>&lt;username&gt;.github.io</code></li>
  <li>Repo: blog <code>&lt;username&gt;.github.io/blog</code></li>
  <li>Repo: projects <code>&lt;username&gt;.github.io/projects</code></li>
  </ul>
  <p>And so on.</p>
  <h2>Custom domains</h2>
  <p>If you want to use custom domains, you would need to &quot;front door&quot; requests to map each subfolder as I don't think there is way to use the above set up with a custom domain.</p>
  <p>Alternatively, you could push the files to a static site hosting location / file storage (i.e. Azure Static Site, Amazon S3, etc). Each push would overwrite files, but you may need a strategy to handle deletions as you're not clearing everything out on each publish.</p>
  
Answers: CC BY-SA 4.0
Answers: 2023-03-25T11:19:30.893Z
Answers: 2023-03-25T11:19:30.893Z
Answers: Fenton
Body: <p>I am trying to create a GitHub workflow that would essentially deploy multiple static websites to GH Pages. The sites would live in their own subfolders beneath the (website) root, and the catch is that they need to be deployed independent of one another.</p>
  <p>For this to work I need to upload a new website build into its subfolder without changing the said folder's siblings. I'm using <code>actions/upload-pages-artifact@v1.0.7</code> but have not found a way of doing this; <code>github-pages</code> environment is always cleared first and only the last thing I upload remains.</p>
  <p>Is there a way to either do &quot;partial writes&quot; through a workflow into the <code>github-pages</code> environment, or, alternatively, can I download my current environment data, append files to it and then upload the whole thing? Or should I just back off and have my workflow manage the files in a branch?</p>
  
Tags: <github><github-actions>
Title: Upload pages artifact without overwriting previous data
UserDisplayName: basse
ThreadText: # Upload pages artifact without overwriting previous data
  
  (Asked by: username_0 on 2023-03-24)
  
  I am trying to create a GitHub workflow that would essentially deploy multiple static websites to GH Pages. The sites would live in their own subfolders beneath the (website) root, and the catch is that they need to be deployed independent of one another.
  
  For this to work I need to upload a new website build into its subfolder without changing the said folder's siblings. I'm using `actions/upload-pages-artifact@v1.0.7` but have not found a way of doing this; `github-pages` environment is always cleared first and only the last thing I upload remains.
  
  Is there a way to either do "partial writes" through a workflow into the `github-pages` environment, or, alternatively, can I download my current environment data, append files to it and then upload the whole thing? Or should I just back off and have my workflow manage the files in a branch?
  
  **Tags:** github, github-actions
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-03-25. Score: 0
  
  If you are using GitHub addresses for the page, it naturally creates subfolders for additional repositories. You can only choose one repository to be the root.
  
  Example
  
  * Repo: website `<username>.github.io`
  * Repo: blog `<username>.github.io/blog`
  * Repo: projects `<username>.github.io/projects`
  
  And so on.
  
  ## Custom domains
  
  If you want to use custom domains, you would need to "front door" requests to map each subfolder as I don't think there is way to use the above set up with a custom domain.
  
  Alternatively, you could push the files to a static site hosting location / file storage (i.e. Azure Static Site, Amazon S3, etc). Each push would overwrite files, but you may need a strategy to handle deletions as you're not clearing everything out on each publish.
  
  
  ---
  
  