JamesIves/github-pages-deploy-action

Pushed file asyncapi.html gets renamed to index.html

oliverunger opened this issue · 3 comments

Describe the bug

The file asyncapi.html I want to push gets renamed to index.html and overwrites the current index.html file.

Workflow

I have the following workflow:

- name: Generating HTML from my AsyncAPI document
     uses: docker://asyncapi/github-action-for-generator:2.1.12
     with:
       template: '@asyncapi/html-template@0.28.4'
       filepath: api/src/main/resources/docs/api/my_asyncapi.yml
       outFilename: asyncapi.html
       parameters: singleFile=true
       output: pages

   - name: Deploy GH page
     uses: JamesIves/github-pages-deploy-action@v4
     with:
       token: ${{secrets.GITHUB_TOKEN}}
       folder: pages
       clean: false

The first action creates a file named asyncapi.html.
When the "Deploy GH page" is triggered, it renames this file to index.html and pushes it to the gh-branch.

Expectation

New file asyncapi.html gets added. Other files already on that branch stay as they are.

Are you sure the previous action run isn't modifying this file name for you? I ask this because there's nothing in the deployment code that should cause any sort of file modification other than moving everything from one location to another.

Perhaps try running the first step, and then running ls in the directory it generates the file in: ls pages

Thank you for that hint. You are totally right.
outFilename: asyncapi.html
has to go into the parameters like so:
parameters: singleFile=true outFilename=asyncapi.html

Now it has the right name: asyncapi.html

my fault