@@ -42,97 +42,93 @@ jobs:
4242
4343 # Step 3: Setup Python environment.
4444 - name : Setup Python
45- run : |
46- echo "Current working directory: $(pwd)"
47- echo "Directory contents:"
48- ls -la
49- # uses: actions/setup-python@v4
50- # with:
51- # python-version: '3.11'
52- # cache: 'pip'
53- # cache-dependency-path: requirements.txt
45+ uses : actions/setup-python@v4
46+ with :
47+ python-version : ' 3.11'
48+ cache : ' pip'
49+ cache-dependency-path : sync/source/requirements.txt
5450
5551 # Step 4: Install dependencies.
5652 - name : Install dependencies
5753 run : |
5854 python -m pip install --upgrade pip
59- python -m pip install -r requirements.txt
55+ python -m pip install -r sync/source/ requirements.txt
6056
6157 # Step 5: Run the MD to MDX conversion script.
6258 - name : Run sync script
6359 run : |
64- python scripts/md2mdx.py
60+ python sync/source/ scripts/md2mdx.py
6561
6662 # Step 6: Create or update PR with changes.
67- - name : Create Pull Request
68- env :
69- GH_TOKEN : ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
70- run : |
71- cd sync/target
63+ # - name: Create Pull Request
64+ # env:
65+ # GH_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
66+ # run: |
67+ # cd sync/target
7268
73- # Debug: Show current directory and its contents
74- echo "Current directory: $(pwd)"
75- echo "Directory contents:"
76- ls -la
69+ # # Debug: Show current directory and its contents
70+ # echo "Current directory: $(pwd)"
71+ # echo "Directory contents:"
72+ # ls -la
7773
78- # Debug: Show git status in detail
79- echo "Git status:"
80- git status
74+ # # Debug: Show git status in detail
75+ # echo "Git status:"
76+ # git status
8177
82- # Debug: Show any differences
83- echo "Git diff:"
84- git diff
78+ # # Debug: Show any differences
79+ # echo "Git diff:"
80+ # git diff
8581
86- git config user.name "github-actions[bot]"
87- git config user.email "github-actions[bot]@users.noreply.github.com"
82+ # git config user.name "github-actions[bot]"
83+ # git config user.email "github-actions[bot]@users.noreply.github.com"
8884
89- # Create new branch (with error handling).
90- git checkout -b ${{ env.TARGET_BRANCH }} || git checkout ${{ env.TARGET_BRANCH }}
85+ # # Create new branch (with error handling).
86+ # git checkout -b ${{ env.TARGET_BRANCH }} || git checkout ${{ env.TARGET_BRANCH }}
9187
92- # Debug: Show branch status
93- echo "Current branch:"
94- git branch --show-current
88+ # # Debug: Show branch status
89+ # echo "Current branch:"
90+ # git branch --show-current
9591
96- # Only create PR if there are changes.
97- if [[ -n "$(git status --porcelain)" ]]; then
98- echo "Changes detected:"
99- git status --porcelain
92+ # # Only create PR if there are changes.
93+ # if [[ -n "$(git status --porcelain)" ]]; then
94+ # echo "Changes detected:"
95+ # git status --porcelain
10096
101- git add .
102- git commit -m "sync: Update MDX content from whitepaper"
97+ # git add .
98+ # git commit -m "sync: Update MDX content from whitepaper"
10399
104- # Add error handling for push.
105- if ! git push -f origin ${{ env.TARGET_BRANCH }}; then
106- echo "Failed to push changes"
107- exit 1
108- fi
100+ # # Add error handling for push.
101+ # if ! git push -f origin ${{ env.TARGET_BRANCH }}; then
102+ # echo "Failed to push changes"
103+ # exit 1
104+ # fi
109105
110- # Create or update PR with labels and assignee.
111- PR_TITLE="sync: Update MDX content from whitepaper"
112- PR_BODY="Automated sync of whitepaper content to MDX format.
106+ # # Create or update PR with labels and assignee.
107+ # PR_TITLE="sync: Update MDX content from whitepaper"
108+ # PR_BODY="Automated sync of whitepaper content to MDX format.
113109
114- This PR was automatically generated by the sync workflow.
110+ # This PR was automatically generated by the sync workflow.
115111
116- - [ ] Review content changes
117- - [ ] Check MDX formatting"
112+ # - [ ] Review content changes
113+ # - [ ] Check MDX formatting"
118114
119- if gh pr view ${{ env.TARGET_BRANCH }} &>/dev/null; then
120- gh pr edit ${{ env.TARGET_BRANCH }} \
121- --title "${PR_TITLE}" \
122- --body "${PR_BODY}" \
123- --add-label "automated,sync" \
124- --add-assignee "${{ github.actor }}"
125- else
126- gh pr create \
127- --title "${PR_TITLE}" \
128- --body "${PR_BODY}" \
129- --base main \
130- --head ${{ env.TARGET_BRANCH }} \
131- --label "automated,sync" \
132- --assignee "${{ github.actor }}"
133- fi
134- else
135- echo "No changes detected in git status --porcelain"
136- echo "Full directory contents of target/src/content/pages:"
137- ls -la target/src/content/pages/
138- fi
115+ # if gh pr view ${{ env.TARGET_BRANCH }} &>/dev/null; then
116+ # gh pr edit ${{ env.TARGET_BRANCH }} \
117+ # --title "${PR_TITLE}" \
118+ # --body "${PR_BODY}" \
119+ # --add-label "automated,sync" \
120+ # --add-assignee "${{ github.actor }}"
121+ # else
122+ # gh pr create \
123+ # --title "${PR_TITLE}" \
124+ # --body "${PR_BODY}" \
125+ # --base main \
126+ # --head ${{ env.TARGET_BRANCH }} \
127+ # --label "automated,sync" \
128+ # --assignee "${{ github.actor }}"
129+ # fi
130+ # else
131+ # echo "No changes detected in git status --porcelain"
132+ # echo "Full directory contents of target/src/content/pages:"
133+ # ls -la target/src/content/pages/
134+ # fi
0 commit comments