Skip to content

rc release activity-pub #122

rc release activity-pub

rc release activity-pub #122

Workflow file for this run

name: Jekyll Build and Deploy
on:
push:
branches: ["main"]
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Decode Production Key
run: echo ${{ secrets.ENCODED_DP_AP_KEY }} | base64 --decode > /tmp/secret.key
- name: Build site
run: bundle exec jekyll build --key /tmp/secret.key
- uses: actions/cache@v4
id: build-cache
with:
path: ./*
key: ${{ github.sha }}
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: [build]
environment:
name: production
url: https://ournetworks.ca
steps:
- uses: actions/cache@v4
id: build-cache
with:
path: ./*
key: ${{ github.sha }}
- name: Rsync Deployment
uses: Burnett01/rsync-deployments@7.0.1
with:
switches: -avzrO --delete --no-p
path: _site/
remote_path: /var/www/html
remote_host: ournetworks.ca
remote_user: ${{ secrets.DEPLOY_USER }}
remote_key: ${{ secrets.DEPLOY_KEY }}
deploy-distributed-press:
name: Deploy to Distributed Press
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/cache@v4
id: build-cache
with:
path: ./*
key: ${{ github.sha }}
- name: Publish to Distributed Press
uses: hyphacoop/actions-distributed-press@v1.2.2
with:
publish_dir: _site
dp_url: https://press.ournetworks.ca
refresh_token: ${{ secrets.REFRESH_TOKEN }}
site_url: ournetworks.ca
deploy_http: true
deploy_hyper: true
deploy_ipfs: true
notify-ap:
name: Notify AcitivityPub
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Decode Production Key
run: echo ${{ secrets.ENCODED_DP_AP_KEY }} | base64 --decode > /tmp/secret.key
- name: Build site
run: bundle exec jekyll build --key /tmp/secret.key
- name: Notify AP
run: bundle exec jekyll notify --key /tmp/secret.key --verbose --trace
- name: Commit ActivityPub Data
uses: EndBug/add-and-commit@v9
with:
add: '_data/activity_pub.yml'
default_author: github_actions
message: 'Commit ActivityPub Data'
fetch: true