Skip to content

Commit

Permalink
sync test 3
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdibha committed Nov 18, 2023
1 parent b54aa24 commit c24af29
Showing 1 changed file with 15 additions and 37 deletions.
52 changes: 15 additions & 37 deletions .github/workflows/notionfolio-sync.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,22 @@
name: Sync with Folio
name: Sync with notionfolio

on:
push:
branches:
- main # Change this to your main branch name
branches: [main]
pull_request:
branches: [main]

jobs:
sync:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout source repository
uses: actions/checkout@v2
with:
path: ./src/app

- name: Checkout destination repository
uses: actions/checkout@v2
with:
repository: mehdibha/notionfolio # Replace with the username and repository name
token: ${{ secrets.GH_TOKEN }}
path: ./src/app/[domain]/foliotest

- name: Copy files to destination repository
run: |
cp -r ./src/app/* ./src/app/[domain]/foliotest
- name: Commit and push changes
run: |
cd ./folio
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git add .
git commit -m "Sync changes from ./src/app"
git push
- name: Create pull request
uses: peter-evans/create-pull-request@v3
with:
commit-message: "Sync changes from ./src/app"
title: "Sync changes from ./src/app"
branch: main # Change this to your main branch name
delete-branch: true
- name: Pushes to another repository
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.GH_TOKEN }}
with:
source-directory: "src/app"
destination-github-username: "mehdibha"
destination-repository-name: "notionfolio"
user-email: [email protected]
target-branch: main

1 comment on commit c24af29

@vercel
Copy link

@vercel vercel bot commented on c24af29 Nov 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.