Skip to content

Commit

Permalink
Update action
Browse files Browse the repository at this point in the history
  • Loading branch information
jhcoll committed Oct 24, 2023
1 parent d74ca59 commit 6779f8b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/generate-related.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@ jobs:
- run: npm install
- run: npm run compute-embeddings --OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
- run: npm run generate-related
- name: Create New Pull Request
if: steps.calibre.outputs.markdown != ''
- name: Create Pull Request if Needed
uses: peter-evans/create-pull-request@v4
with:
title: Auto Compressed Images
title: Auto Generated Read More Links
branch-suffix: timestamp
commit-message: Auto Compressed Images
body: ${{ steps.calibre.outputs.markdown }}
body: |
This PR was automatically generated by a GitHub Action.
It contains the auto generated related links for all posts.
add-paths: |
_data/related.yml
2 changes: 1 addition & 1 deletion scripts/generate-related/compute-embeddings.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const summarisePost = async (post) => {
};

(async () => {
const paths = await glob("./_posts/**/{20[1][3-9]\,20[2][0-3]}-*.{md,markdown,html}").then((paths) => {
const paths = await glob('./_posts/**/{20[1][3-9],20[2][0-3]}-*.{md,markdown,html}').then((paths) => {
return paths;
});

Expand Down

0 comments on commit 6779f8b

Please sign in to comment.