Skip to content

Commit 1962ef1

Browse files
committed
refactor: cleanup
1 parent d069fe8 commit 1962ef1

File tree

7 files changed

+53
-464
lines changed

7 files changed

+53
-464
lines changed

.github/workflows/sync-content.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

.github/workflows/sync-to-docs.yml

Lines changed: 53 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -82,41 +82,67 @@ jobs:
8282
8383
- name: Create deployment comment
8484
if: env.CHANGES_MADE == 'true'
85+
continue-on-error: true
8586
uses: actions/github-script@v7
8687
with:
8788
script: |
88-
const { owner, repo } = context.repo;
89-
const sha = context.sha;
90-
91-
await github.rest.repos.createCommitComment({
92-
owner,
93-
repo,
94-
commit_sha: sha,
95-
body: `✅ **Cookbook sync completed successfully!**
96-
97-
The cookbook content has been synced to the docs site and navigation has been updated automatically.
89+
try {
90+
const { owner, repo } = context.repo;
91+
const sha = context.sha;
9892
99-
📈 Changes will be live on docs.perplexity.ai within a few minutes.
100-
101-
🔗 [View docs site](https://docs.perplexity.ai/cookbook)`
102-
});
93+
await github.rest.repos.createCommitComment({
94+
owner,
95+
repo,
96+
commit_sha: sha,
97+
body: `✅ **Cookbook sync completed successfully!**
98+
99+
The cookbook content has been synced to the docs site and navigation has been updated automatically.
100+
101+
📈 Changes will be live on docs.perplexity.ai within a few minutes.
102+
103+
🔗 [View docs site](https://docs.perplexity.ai/cookbook)`
104+
});
105+
console.log('✅ Success comment posted successfully');
106+
} catch (error) {
107+
console.log('⚠️ Could not post comment (insufficient permissions):', error.message);
108+
console.log('✅ Sync completed successfully anyway!');
109+
}
103110
104111
- name: Report sync failure
105112
if: failure()
113+
continue-on-error: true
106114
uses: actions/github-script@v7
107115
with:
108116
script: |
109-
const { owner, repo } = context.repo;
110-
const sha = context.sha;
111-
112-
await github.rest.repos.createCommitComment({
113-
owner,
114-
repo,
115-
commit_sha: sha,
116-
body: `❌ **Cookbook sync failed**
117+
try {
118+
const { owner, repo } = context.repo;
119+
const sha = context.sha;
117120
118-
There was an error syncing the cookbook content to the docs site.
119-
Please check the [workflow logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for details.
120-
121-
The docs site may not reflect the latest cookbook changes until this is resolved.`
122-
});
121+
await github.rest.repos.createCommitComment({
122+
owner,
123+
repo,
124+
commit_sha: sha,
125+
body: `❌ **Cookbook sync failed**
126+
127+
There was an error syncing the cookbook content to the docs site.
128+
Please check the [workflow logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for details.
129+
130+
The docs site may not reflect the latest cookbook changes until this is resolved.`
131+
});
132+
} catch (error) {
133+
console.log('⚠️ Could not post failure comment (insufficient permissions):', error.message);
134+
console.log('❌ Sync failed - check workflow logs for details');
135+
}
136+
137+
- name: Log sync status
138+
if: always()
139+
run: |
140+
if [ "${{ env.CHANGES_MADE }}" = "true" ]; then
141+
echo "🎉 COOKBOOK SYNC SUCCESS!"
142+
echo "📚 Content synced to docs repository"
143+
echo "🔧 Navigation updated automatically"
144+
echo "🚀 Changes will be live on docs.perplexity.ai within minutes"
145+
else
146+
echo "ℹ️ No changes to sync"
147+
echo "📄 Cookbook content is already up to date"
148+
fi

static/img/docusaurus-social-card.jpg

-54.4 KB
Binary file not shown.

static/img/docusaurus.png

-5.02 KB
Binary file not shown.

0 commit comments

Comments
 (0)