1+ ---
12name : Build and Publish Documentation
23
34inputs :
4- # The target's name which documentation is built for.
55 target :
66 required : true
77 type : string
8- # The output path for the documentation.
98 output_path :
109 required : true
1110 type : string
12- # The hosting base path for the documentation.
1311 hosting_base_path :
1412 required : true
1513 type : string
16- # The branch name to which documentation will be uploaded.
1714 branch_name :
1815 required : true
1916 type : string
4643 shell : bash
4744 run : |
4845 git fetch
49- git worktree add --checkout ${{ inputs.branch_name }} origin/${{ inputs.branch_name }}
46+ git worktree add --checkout ${{ inputs.branch_name }} \
47+ origin/${{ inputs.branch_name }}
48+
49+ git config --local user.email \
50+ "github-actions[bot]@users.noreply.github.com"
5051
51- git config --local user.email "github-actions[bot]@users.noreply.github.com"
5252 git config --local user.name "github-actions[bot]"
5353 git switch ${{ inputs.branch_name }}
5454
@@ -59,12 +59,14 @@ runs:
5959 git add ./${{ inputs.output_path }}
6060
6161 if [ -n "$(git status --porcelain)" ]; then
62- echo "Documentation changes found. Commiting the changes to the '${{ inputs.branch_name }}' branch and pushing to origin."
62+ echo "Documentation changes found. \
63+ Commiting the changes to the '${{ inputs.branch_name }}' \
64+ branch and pushing to origin."
6365 git commit -a -m "Generated ${{ inputs.target }} Swift DocC"
6466 git push origin ${{ inputs.branch_name }}
6567 else
6668 # No changes found, nothing to commit.
6769 echo "No documentation changes found."
6870 fi
6971
70- git worktree remove ${{ inputs.branch_name }}
72+ git worktree remove ${{ inputs.branch_name }}
0 commit comments