name: 'Remanso Publish' description: 'Publish your .pub.md notes to ATProtocol using Remanso CLI' branding: icon: 'upload-cloud' color: 'green' inputs: identifier: description: 'ATProto handle or DID (e.g. yourname.bsky.social)' required: true app-password: description: 'ATProto app password' required: true pds-url: description: 'PDS URL (defaults to https://bsky.social)' required: false default: 'https://bsky.social' force: description: 'Force publish all notes, ignoring change detection' required: false default: 'false' commit-back: description: 'Commit updated frontmatter back to the repo' required: false default: 'true' working-directory: description: 'Directory containing remanso.json (defaults to repo root)' required: false default: '.' runs: using: 'composite' steps: - name: Setup Bun uses: oven-sh/setup-bun@v2 - name: Cache dependencies id: deps-cache uses: actions/cache@v4 with: path: ${{ github.action_path }}/node_modules key: remanso-deps-${{ runner.os }}-${{ hashFiles(format('{0}/bun.lock', github.action_path)) }} - name: Install dependencies if: steps.deps-cache.outputs.cache-hit != 'true' shell: bash run: cd ${{ github.action_path }} && bun install - name: Cache build artifacts id: build-cache uses: actions/cache@v4 with: path: ${{ github.action_path }}/packages/remanso/dist key: remanso-build-${{ runner.os }}-${{ hashFiles(format('{0}/bun.lock', github.action_path), format('{0}/packages/remanso/src/**', github.action_path)) }} - name: Build CLI if: steps.build-cache.outputs.cache-hit != 'true' shell: bash run: cd ${{ github.action_path }} && bun run build:remanso - name: Link CLI shell: bash run: cd ${{ github.action_path }} && bun link --cwd packages/remanso - name: Sync state from ATProtocol shell: bash working-directory: ${{ inputs.working-directory }} env: ATP_IDENTIFIER: ${{ inputs.identifier }} ATP_APP_PASSWORD: ${{ inputs.app-password }} PDS_URL: ${{ inputs.pds-url }} run: remanso sync - name: Publish shell: bash working-directory: ${{ inputs.working-directory }} env: ATP_IDENTIFIER: ${{ inputs.identifier }} ATP_APP_PASSWORD: ${{ inputs.app-password }} PDS_URL: ${{ inputs.pds-url }} run: | FLAGS="" if [ "${{ inputs.force }}" = "true" ]; then FLAGS="--force" fi remanso publish $FLAGS - name: Commit back changes if: inputs.commit-back == 'true' shell: bash working-directory: ${{ inputs.working-directory }} run: | git config user.name "$(git log -1 --format='%an')" git config user.email "$(git log -1 --format='%ae')" git add -A -- '**/*.pub.md' || true if git diff --cached --quiet; then echo "No changes to commit" else git commit -m "chore: update remanso state [skip ci]" git push fi