80 lines
1.8 KiB
YAML
80 lines
1.8 KiB
YAML
name: man jpbernius
|
|
|
|
on:
|
|
push:
|
|
branches: [ "man" ]
|
|
|
|
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 "s|<a href=\"https://hachyderm.io/@jpbernius\">|<a rel=\"me\" href=\"https://hachyderm.io/@jpbernius\">|g" ./README.1.html
|
|
|
|
- run: |
|
|
mkdir -p out
|
|
mv README.1.html out/index.html
|
|
|
|
- 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
|
|
|
|
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
|