Skip to content

Apply automatic changes #1

Apply automatic changes

Apply automatic changes #1

Workflow file for this run

name: Deploy to target repository
on:
workflow_dispatch:
push:
branches: ['master']
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
if: github.repository == 'BMCV/mobi-fs3-python-dev'
steps:
- name: Checkout source repository
uses: actions/checkout@v4
with:
path: src
- name: Checkout target repository
uses: actions/checkout@v4
with:
repository: BMCV/mobi-fs3-python
path: dst
fetch-depth: 1
ssh-key: ${{ secrets.TARGET_REPOSITORY_PRIVATE_KEY }}
- name: Copy files
shell: python
run: |
import shutil
ignore = shutil.ignore_patterns(
'.git',
'.github/dependabot.yml',
'.github/workflows/deploy.yml',
'_solutions',
'_deploy',
)
shutil.copytree('src', 'dst', ignore=ignore, dirs_exist_ok=True)
shutil.copytree('src/_deploy', 'dst', dirs_exist_ok=True)
- name: Squash and deploy
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_options: '--amend --no-edit'
push_options: '--force'
skip_fetch: true
repository: dst