Skip to content

New Option destination_dir for deploying to a subdirectory #324

@peaceiris

Description

@peaceiris

Is your feature request related to a problem? Please describe

Some users seem to want to deploy to a subdirectory.

Describe the solution you'd like

Add a new option destination_dir for setting a directory name.

Describe alternatives you've considered

We can use the option keep_files in this case already. But it seems to be a little difficult for users to understand the behavior.

- name: Setup assets
  run: |
    mkdir public subdir1
    mv your_contents ./subdir1/
    mv ./subdir1 ./public/

- name: Deploy
  uses: peaceiris/actions-gh-pages@v3
  with:
    github_token: ${{ secrets.GITHUB_TOKEN }}
    publish_dir: ./public
    keep_files: true

After we get the destination_dir option, the above steps will be merged into one as follows.

- name: Deploy
  uses: peaceiris/actions-gh-pages@v3
  with:
    github_token: ${{ secrets.GITHUB_TOKEN }}
    publish_dir: ./public
    destination_dir: ./subdir1

Additional context

It seems tedious to implement and test it in consideration of a variety of situations.

To be investigated:

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions