Skip to content

Commit

Permalink
clean workflow file
Browse files Browse the repository at this point in the history
  • Loading branch information
larshinueber committed Aug 20, 2024
1 parent e881811 commit 8bcfc30
Showing 1 changed file with 3 additions and 46 deletions.
49 changes: 3 additions & 46 deletions .github/workflows/sync-foo-space.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,73 +6,30 @@ on:
workflow_dispatch:

env:
SOURCE_DIR: ./src/
TARGET_OWNER: larshinueber
TARGET_REPO: foo-space
TARGET_DIR: docs/source/_src_getting_started/_src_examples/notebooks/foopy-examples
USER_NAME: github-actions
USER_EMAIL: [email protected]

jobs:
sync:
# if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
env:
# BRANCH_NAME: man-repo-sync-${{ github.event_name == 'pull_request' && github.event.pull_request.number || 'dispatch' }}
GH_TOKEN: ${{ secrets.GH_PAT }}
steps:
# - name: Checkout source repository
# uses: actions/checkout@v4
- name: Checkout target repository
uses: actions/checkout@v4
with:
repository: ${{ env.TARGET_OWNER }}/${{ env.TARGET_REPO }}
# token: ${{ secrets.GH_PAT }}
token: ${{ secrets.GH_PAT }}
ref: submodules
# submodules: true
# path: ./${{ env.TARGET_REPO }}

- name: Fetch new commits
run: |
# git pull --recurse-submodules
# git submodule update --remote --recursive
# git submodule update --remote
# cd ${{ env.TARGET_DIR }}
# git checkout -b submodules
# git pull
# git status
# git submodule foreach git pull
git submodule update --init --recursive
git submodule update --recursive --remote
# git submodule update --remote
- name: Commit and push changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Update submodule to ${{ github.event.after }}"


# - name: Create new branch
# run: |
# bash .github/scripts/checkout_branch.sh ${{ env.TARGET_REPO }} ${{ env.BRANCH_NAME }} ${{ env.USER_EMAIL }} ${{ env.USER_NAME }}

# - name: Delete old files
# run: |
# rm -rf ${{ env.TARGET_DIR }}

# - name: Setup Python
# uses: actions/setup-python@v2
# with:
# python-version: '3.11'

# - name: Copy new files
# run: |
# python .github/scripts/copy_notebooks.py ${{ env.SOURCE_DIR }} ${{ env.TARGET_DIR }}

# - name: Push changes
# run: |
# bash .github/scripts/commit_and_push.sh ${{ env.TARGET_REPO }} ${{ env.BRANCH_NAME }}

# - name: Create PR
# run: |
# bash .github/scripts/create_pr.sh ${{ env.TARGET_REPO }} ${{ env.BRANCH_NAME }}

0 comments on commit 8bcfc30

Please sign in to comment.