Skip to content

Commit

Permalink
chore: update sync doc action
Browse files Browse the repository at this point in the history
  • Loading branch information
chongqiangchen committed Jun 1, 2024
1 parent 2fd5319 commit 7737d58
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/sync-tutorials-new.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Sync Tutorials New
name: Sync Tutorials

on:
workflow_dispatch:
Expand All @@ -19,10 +19,11 @@ jobs:
sudo apt-get update
sudo apt-get install -y jq
- name: Sync Documentation
- name: Run Sync Script
working-directory: frontend/scripts/sync
run: |
chmod +x sync-docs.sh
./sync-docs.sh
chmod +x sync.sh
./sync.sh
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
Expand All @@ -32,9 +33,7 @@ jobs:
title: "Update Tutorials"
body: |
This is an automated PR to update tutorials.
${{
steps.sync-tutorials.outputs.changes
}}
$(cat frontend/scripts/sync/changes.txt)
branch: "update-tutorials-${{ github.run_id }}"
base: "main"
labels: "automated pr"
File renamed without changes.
4 changes: 2 additions & 2 deletions .github/scripts/sync.sh → scripts/sync/sync.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# 读取 sync-docs.json 并解析其内容
CONFIG_FILE="sync-docs.json"
# 读取 sync.json 并解析其内容
CONFIG_FILE="sync.json"
CHANGES=""

jq -c '.[]' $CONFIG_FILE | while read -r repo; do
Expand Down

0 comments on commit 7737d58

Please sign in to comment.