Skip to content

Commit

Permalink
chore: add git action
Browse files Browse the repository at this point in the history
  • Loading branch information
chongqiangchen committed Jun 1, 2024
1 parent a2c9fac commit a84af83
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/sync-tutorials-new.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Sync Tutorials
name: Sync Tutorials New

on:
workflow_dispatch:
Expand All @@ -9,29 +9,30 @@ jobs:
sync-tutorials:
runs-on: ubuntu-latest
steps:
- name: Checkout Frontend Repo
- name: Checkout Current Repo
uses: actions/checkout@v4
with:
repository: 'WTFAcademy/frontend'
path: 'frontend'
fetch-depth: 0

- name: Checkout Current Repo
- name: Checkout Frontend Repo
uses: actions/checkout@v4
with:
repository: 'WTFAcademy/frontend'
path: 'frontend'
fetch-depth: 0

- name: Sync WTF Ethers Tutorials
run: |
git clone https://github.com/WTFAcademy/WTF-Ethers.git
mkdir -p frontend/docs/ethers-101/
cp -r WTF-Ethers/0{1..9}_* frontend/docs/ethers-101/
cp -r WTF-Ethers/10_* frontend/docs/ethers-101/
rm -rf WTF-Ethers
cd frontend
git add docs/ethers-101/
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git commit -m "Update tutorials"
git commit -m "Update tutorials" || echo "No changes to commit"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
Expand Down

0 comments on commit a84af83

Please sign in to comment.