Bump jekyll-activity-pub from 0.3.3 to 0.3.6 #1506
Workflow file for this run
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: Deploy Jekyll Site | |
| on: | |
| push: | |
| branches: | |
| - staging | |
| - master | |
| - dp-v1-prod | |
| pull_request: | |
| branches: | |
| - staging | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Get system info | |
| - run: ifconfig | |
| - run: sudo dmidecode | |
| - run: df -h | |
| - run: free -m | |
| - run: echo "GitHub branch is ${{ github.ref }}" | |
| # Conditional checkout for PRs | |
| - name: Checkout PR branch | |
| if: github.event_name == 'pull_request' | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| # Standard checkout for non-PR events | |
| - name: Checkout repo | |
| if: github.event_name != 'pull_request' | |
| uses: actions/checkout@v4 | |
| # Install Brotli development headers (Fix for ruby-brs gem) | |
| - name: Install Brotli dependencies | |
| run: sudo apt-get update && sudo apt-get install -y libbrotli-dev | |
| # Install Sequoia (AT Protocol / Standard.site) | |
| # Only on push to master | |
| - name: Install Sequoia | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| run: npm i -g sequoia-cli | |
| # Publish to AT Protocol | |
| # Only on push to master (avoids publishing staging content to prod PDS) | |
| - name: Publish to ATProto | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| env: | |
| ATP_IDENTIFIER: ${{ secrets.ATP_IDENTIFIER }} | |
| ATP_APP_PASSWORD: ${{ secrets.ATP_APP_PASSWORD }} | |
| run: sequoia publish | |
| # Build Jekyll Site | |
| - run: echo "Building Jekyll site" | |
| - run: sudo gem install bundler | |
| - run: sudo gem install jekyll | |
| - run: sudo bundle install | |
| - name: Set DP Social URL based on branch | |
| run: | | |
| if [[ "${{ github.ref }}" == "refs/heads/master" ]] || [[ "${{ github.event_name }}" == "pull_request" && "${{ github.base_ref }}" == "master" ]]; then | |
| sed -i 's|url: "https://social.dp.chanterelle.xyz"|url: "${{ vars.SOCIAL_DP_PROD }}"|' _config.yml | |
| elif [[ "${{ github.ref }}" == "refs/heads/staging" ]] || [[ "${{ github.event_name }}" == "pull_request" && "${{ github.base_ref }}" == "staging" ]]; then | |
| # Replace with staging URL for activity_pub (SOCIAL_DP_STAGING) | |
| sed -i 's|url: "https://social.dp.chanterelle.xyz"|url: "${{ vars.SOCIAL_DP_STAGING }}"|' _config.yml | |
| fi | |
| # Decode the correct key based on the branch | |
| - name: Decode Staging Key | |
| if: > | |
| github.ref == 'refs/heads/staging' || | |
| (github.event_name == 'pull_request' && github.base_ref == 'staging') | |
| run: echo ${{ secrets.ENCODED_DP_AP_KEY_STAGING }} | base64 --decode > /tmp/secret.key | |
| - name: Decode Production Key | |
| if: > | |
| github.ref == 'refs/heads/master' || | |
| (github.event_name == 'pull_request' && github.base_ref == 'master') | |
| run: echo ${{ secrets.ENCODED_DP_AP_KEY_PRODUCTION }} | base64 --decode > /tmp/secret.key | |
| - name: Build Jekyll Site for Staging | |
| if: github.ref == 'refs/heads/staging' || (github.event_name == 'pull_request' && github.base_ref == 'staging') | |
| run: | | |
| JEKYLL_ENV=staging make build-dweb | |
| - name: Build Jekyll Site for Production | |
| if: github.ref == 'refs/heads/master' || (github.event_name == 'pull_request' && github.base_ref == 'master') | |
| run: | | |
| make build-dweb | |
| - run: make check | |
| # Inject AT URI link tags into built HTML (Standard.site verification) | |
| - name: Inject Sequoia link tags | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| run: sequoia inject | |
| - name: Publish to Distributed Press Staging | |
| if: ${{ github.ref == 'refs/heads/staging' }} | |
| uses: hyphacoop/actions-distributed-press@v1.1.0 | |
| with: | |
| publish_dir: _site | |
| dp_url: https://dp.chanterelle.xyz | |
| refresh_token: ${{ secrets.DISTRIBUTED_PRESS_STAGING_TOKEN }} | |
| site_url: staging.hypha.coop | |
| - name: Publish to Distributed Press Production | |
| if: ${{ github.ref == 'refs/heads/master' }} | |
| uses: hyphacoop/actions-distributed-press@v1.1.0 | |
| with: | |
| publish_dir: _site | |
| dp_url: https://api.distributed.press | |
| refresh_token: ${{ secrets.DISTRIBUTED_PRESS_PRODUCTION_TOKEN}} | |
| site_url: hypha.coop | |
| - name: Notify AP | |
| if: github.ref == 'refs/heads/master' || (github.event_name == 'pull_request' && github.base_ref == 'master') | |
| run: bundle exec jekyll notify --key /tmp/secret.key --verbose --trace | |
| - name: Commit ActivityPub and Sequoia Data | |
| if: github.ref == 'refs/heads/master' || (github.event_name == 'pull_request' && github.base_ref == 'master') | |
| uses: EndBug/add-and-commit@v9 | |
| with: | |
| add: '_data/activity_pub.yml,.sequoia-state.json,_posts' | |
| default_author: github_actions | |
| message: 'Commit ActivityPub and Sequoia data' | |
| fetch: true | |