Skip to content

Commit

Permalink
Feat: Auto publish to dev.to (tailcallhq#363)
Browse files Browse the repository at this point in the history
Co-authored-by: Tushar Mathur <[email protected]>
  • Loading branch information
hunxjunedo and tusharmath authored Jul 21, 2024
1 parent e18d471 commit 209de5b
Show file tree
Hide file tree
Showing 20 changed files with 7,250 additions and 3,428 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
run: |
npm install
npx prettier --check "**/*.{graphql,yml,json,md,sh,ts,tsx,js}"
cd ./publish-hashnode
cd ./publish-externals
npm run generate
cd ..
npm run typecheck
Expand All @@ -49,13 +49,16 @@ jobs:
files: |
blog/**/*.{md,mdx}
- name: Publish to Hashnode 📝
- name: Publish to Hashnode and Dev.to 📝
if: github.ref == 'refs/heads/develop' && steps.changed-markdown-files.outputs.any_changed == 'true'
env:
HASHNODE_PAT: ${{ secrets.HASHNODE_PAT }}
HASHNODE_PUBLICATION_ID: ${{ secrets.HASHNODE_PUBLICATION_ID }}
CHANGED_FILES: ${{ steps.changed-markdown-files.outputs.all_changed_files }}
DEVTO_API_KEY: ${{ secrets.DEVTO_API_KEY}}
DEVTO_ORG_ID: ${{secrets.DEVTO_ORG_ID}}
DEVTO_ORG_NAME: ${{secrets.DEVTO_ORG_NAME}}
run: |
cd ./publish-hashnode
cd ./publish-externals
npm run generate
npx --yes tsx ./src/index.ts "$CHANGED_FILES"
5,058 changes: 1,708 additions & 3,350 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"workspaces": [
"publish-hashnode"
"publish-externals"
],
"scripts": {
"docusaurus": "docusaurus",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 209de5b

Please sign in to comment.