0
0
Fork 0
.profile/.github/workflows/man.yaml

88 lines
2.2 KiB
YAML

name: man jpbernius
on:
push:
branches: [ "man" ]
workflow_dispatch:
jobs:
html:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
- name: Configure Umami
run: echo '${{ vars.UMAMI_SCRIPT }}' >> README.md
- name: ronn --html
run: bundle exec ronn --html --style=toc --organization="Jan Philip Bernius" README.md
- name: Mastodon Verification
run: sed -i 's|<a href="https://hachyderm.io/@jpbernius">|<a href="https://hachyderm.io/@jpbernius" rel="me">|g' ./README.1.html
- run: |
mkdir -p {out,out/.well-known}
mv README.1.html out/index.html
- name: Mastodon Webfinger
run: curl -o out/.well-known/webfinger "https://hachyderm.io/.well-known/webfinger?resource=acct:jpbernius@hachyderm.io"
- name: security.txt
run: curl -o out/.well-known/security.txt "https://www.janphilip.bernius.net/.well-known/security.txt"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'out'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
mirror:
runs-on: ubuntu-latest
if: github.event_name == 'push'
strategy:
matrix:
environment: ["gitlab.com", "code.bernius.net", "codeberg.org"]
environment: ${{ matrix.environment }}
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup SSH Private Key
run: |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ secrets.SSH_KEY }}"
- name: Setup SSH Host Key
run: |
mkdir -p ~/.ssh
echo "${{ vars.SSH_HOST_KEY }}" >> ~/.ssh/known_hosts
- name: Setup Git Remote
run: git remote add mirror ${{ vars.GIT_REMOTE }}
- run: git push --force mirror man