I have 2 repos, repo A with source code and repo B that publishes the build folder to the web.
I have an action for this purpose but im getting an error:
git clone --single-branch --branch main ***github.com/blockcodelabs/B.git /tmp/tmp.NCbLCG<BR>
Cloning into '/tmp/tmp.NCbLCG'...<BR>
remote: Invalid username or password.<BR>
fatal: Authentication failed for 'https://github.com/blockcodelabs/B.git/'<BR>
The action is setup on Repo A, and Repo B has secret.ACCESS_TOKEN
:
name: Push File(or Dir) to another repository
on:
push:
branches: [master]
jobs:
copy-file:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Push to another repo
uses: dmnemec/copy_file_to_another_repo_action@main
env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
source_file: 'build'
destination_repo: 'blockcodelabs/B'
destination_folder: 'build'
user_email: 'email'
user_name: 'username'
commit_message: 'Automatic Build To B'