Composite GitHub Action (Linux runner) for deploying repository content to remote server. Fast and customizable deployment with proxy support. Deploy only changed files or do full sync/mirror of repository content.
The Unlicense
62
stars
14
forks
source link
Delta Syning combined with push action not working #38
My Workflow starts when I push to main, builds the project and pushes the artifact from the dest folder to the gh-pages branch.
Now I want to sync the gh-pages branch to my sftp server.
This does not work, as the sftp action gets the changes from the main branch not from the gh-pages branch.
When using the delta mode, the script still looks at the latest commit in the main branch not in the gh-pages branch, because the {{github.sha}} variable points to main, as main triggered the workflow.
The action should use git cli to determine the latest commit and not rely on the github context.
Already tried putting the sftp action into another workflow which triggers on push to gh-pages, but a push by the GTIHUB_TOKEN credentials does not trigger workflows - i would have to use a PAT :(
With full sync, everything works, because no commit history is looked at and the {{ github.sha }} is not referenced
My Workflow starts when I push to main, builds the project and pushes the artifact from the dest folder to the gh-pages branch. Now I want to sync the gh-pages branch to my sftp server. This does not work, as the sftp action gets the changes from the main branch not from the gh-pages branch.
When using the delta mode, the script still looks at the latest commit in the main branch not in the gh-pages branch, because the {{github.sha}} variable points to main, as main triggered the workflow.
The action should use git cli to determine the latest commit and not rely on the github context.
Example workflow:
Already tried putting the sftp action into another workflow which triggers on push to gh-pages, but a push by the GTIHUB_TOKEN credentials does not trigger workflows - i would have to use a PAT :(
With full sync, everything works, because no commit history is looked at and the {{ github.sha }} is not referenced