this repo has no description

feat: add composite GitHub Action for automated publishing

Allows users to publish their content to ATProtocol by adding
a single step to their GitHub Actions workflow. Includes state
sync, publish, and optional commit-back of updated frontmatter.

authored by

Julien Calixte and committed by
Julien Calixte
7f3dd598 078397cd

+93
+93
action.yml
··· 1 + name: 'Sequoia Publish' 2 + description: 'Publish your markdown content to ATProtocol using Sequoia CLI' 3 + branding: 4 + icon: 'upload-cloud' 5 + color: 'green' 6 + 7 + inputs: 8 + identifier: 9 + description: 'ATProto handle or DID (e.g. yourname.bsky.social)' 10 + required: true 11 + app-password: 12 + description: 'ATProto app password' 13 + required: true 14 + pds-url: 15 + description: 'PDS URL (defaults to https://bsky.social)' 16 + required: false 17 + default: 'https://bsky.social' 18 + force: 19 + description: 'Force publish all posts, ignoring change detection' 20 + required: false 21 + default: 'false' 22 + commit-back: 23 + description: 'Commit updated frontmatter and state file back to the repo' 24 + required: false 25 + default: 'true' 26 + working-directory: 27 + description: 'Directory containing sequoia.json (defaults to repo root)' 28 + required: false 29 + default: '.' 30 + 31 + runs: 32 + using: 'composite' 33 + steps: 34 + - name: Setup Bun 35 + uses: oven-sh/setup-bun@v2 36 + 37 + - name: Checkout Sequoia CLI 38 + uses: actions/checkout@v4 39 + with: 40 + repository: ${{ github.action_repository }} 41 + ref: ${{ github.action_ref }} 42 + path: .sequoia-action 43 + 44 + - name: Build and install Sequoia CLI 45 + shell: bash 46 + run: | 47 + cd .sequoia-action 48 + bun install 49 + bun run build:cli 50 + bun link --cwd packages/cli 51 + 52 + - name: Sync state from ATProtocol 53 + shell: bash 54 + working-directory: ${{ inputs.working-directory }} 55 + env: 56 + ATP_IDENTIFIER: ${{ inputs.identifier }} 57 + ATP_APP_PASSWORD: ${{ inputs.app-password }} 58 + PDS_URL: ${{ inputs.pds-url }} 59 + run: sequoia sync 60 + 61 + - name: Publish 62 + shell: bash 63 + working-directory: ${{ inputs.working-directory }} 64 + env: 65 + ATP_IDENTIFIER: ${{ inputs.identifier }} 66 + ATP_APP_PASSWORD: ${{ inputs.app-password }} 67 + PDS_URL: ${{ inputs.pds-url }} 68 + run: | 69 + FLAGS="" 70 + if [ "${{ inputs.force }}" = "true" ]; then 71 + FLAGS="--force" 72 + fi 73 + sequoia publish $FLAGS 74 + 75 + - name: Clean up action checkout 76 + shell: bash 77 + run: rm -rf .sequoia-action 78 + 79 + - name: Commit back changes 80 + if: inputs.commit-back == 'true' 81 + shell: bash 82 + working-directory: ${{ inputs.working-directory }} 83 + run: | 84 + git config user.name "github-actions[bot]" 85 + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" 86 + git add -A .sequoia-state.json 87 + git add -A *.md **/*.md || true 88 + if git diff --cached --quiet; then 89 + echo "No changes to commit" 90 + else 91 + git commit -m "chore: update sequoia state [skip ci]" 92 + git push 93 + fi