Repository navigation
Syndicate Post #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Syndicate Post | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| document_id: | |
| description: "Sanity Document ID to syndicate" | |
| required: true | |
| default: "05eda048-efff-4e0f-8b76-83a2f482fa13" | |
| type: string | |
| dataset: | |
| description: "Target Sanity Dataset" | |
| required: true | |
| default: "production" | |
| type: choice | |
| options: | |
| - production | |
| - dev | |
| jobs: | |
| syndicate: | |
| runs-on: ubuntu-latest | |
| environment: production | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Syndicate Post | |
| run: | | |
| node scripts/run-syndicate-post.mjs | |
| env: | |
| TARGET_DOCUMENT_ID: ${{ inputs.document_id }} | |
| SANITY_AUTH_TOKEN: ${{ secrets.SANITY_AUTH_TOKEN }} | |
| SANITY_API_WRITE_TOKEN: ${{ secrets.SANITY_API_WRITE_TOKEN }} | |
| SANITY_STUDIO_PROJECT_ID: ${{ vars.SANITY_STUDIO_PROJECT_ID || 'hfh83o0w' }} | |
| SANITY_STUDIO_DATASET: ${{ inputs.dataset || 'production' }} | |
| PRIVATE_DEVTO: ${{ secrets.PRIVATE_DEVTO }} | |
| PRIVATE_HASHNODE: ${{ secrets.PRIVATE_HASHNODE }} | |
| DEVTO_API_KEY: ${{ secrets.PRIVATE_DEVTO }} | |
| HASHNODE_ACCESS_TOKEN: ${{ secrets.PRIVATE_HASHNODE }} |