-
-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Option destination_dir for deploying to a subdirectory #324
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
#410 was opened |
The v3.7.0-6 has been released as a beta release. - name: Deploy
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
destination_dir: subdir |
This comment has been minimized.
This comment has been minimized.
I highly recommend you to read the GitHub Actions official documentation before you go. You can know the basic syntax of the Actions workflow. - name: Set branch name
id: branch
run: echo "::set-output name=BRANCH_NAME::${GITHUB_REF##*/}"
- name: Deploy
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
destination_dir: ${( steps.branch.outputs.BRANCH_NAME }} |
Thanks for the work on this action and this new feature which is exactly what I need to use this to deploy versioned docs to GH Pages. Unfortunately, I cannot for the life of me get this to work properly (with 3.7.0-6 or -7). Here's what my base config looks like: - name: Upload to GitHub Pages
if: ${{ github.event_name != 'pull_request' && matrix.experimental == false }}
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html/
exclude_assets: '.buildinfo'
destination_dir: ./${{ env.DOC_VERSION }}
keep_files: false
full_commit_message: Deploy ${{ env.DOC_VERSION }} to GitHub Pages (env.DOC_VERSION is dev in this case) with that config I end up with:
so it's not a first deployment, but I think because copying & deleting fails, that's detected as "first deployment". Some googling around on the If I switch to use Any help would be appreciated, because it would be really cool to be able to use this action. Thanks! |
@dopplershift Thank you for the detailed report. |
That seems to have done it. Thanks for the quick turn-around! |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I seem to have a weird issue related to the I tried a number of options:
The You can see here that a The changes are reflected in the If this issue is related to Thanks for your help, and apologies if this is a newbie question! |
The expected input of the - destination_dir: .
If you mean that the file is the
|
Clever solution as I only thought of |
Works great except |
This is the expected behavior. |
Thanks for this handy config option. One thing that became not immediately clear to me is the behavior of destination_dir and keep_files. If I set a destination dir and keep files is false, is only the destination dir erased or the whole branch? Erasing the whole branch would not be very useful for me as it contains documentation of previous versions... |
@m-mohr According to the following line, when the actions-gh-pages/src/git-utils.ts Lines 109 to 116 in d3a97d5
|
@peaceiris Thank you. Yeah, I assumed that, but I think it would be good to clarify that in the docs. |
No. It sounds like it removes all files from the branch and adds the files to publish dir. It seems this assumes branch = dir, but that is confusing. Clear would be something like "If |
@m-mohr I understood your suggestion now. (Sorry, I deleted my previous comment before I get your new reply.) Thank you for the suggestion. I am working on https://github.com/peaceiris/actions-gh-pages/pull/569/files, I am happy if you review it. |
#324 (comment) Co-authored-by: Matthias Mohr <[email protected]>
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.After we get the
destination_dir
option, the above steps will be merged into one as follows.Additional context
It seems tedious to implement and test it in consideration of a variety of situations.
To be investigated:
The text was updated successfully, but these errors were encountered: