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

88 lines
2.2 KiB
YAML
Raw Normal View History

2024-01-07 00:23:33 +01:00
name: man jpbernius
on:
push:
branches: [ "man" ]
2024-05-02 22:34:36 +02:00
workflow_dispatch:
2024-01-07 00:23:33 +01:00
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
2024-01-07 00:23:33 +01:00
- name: ronn --html
run: bundle exec ronn --html --style=toc --organization="Jan Philip Bernius" README.md
2024-01-19 22:18:39 +01:00
- 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
2024-01-07 00:23:33 +01:00
- run: |
2024-03-30 23:53:09 +01:00
mkdir -p {out,out/.well-known}
2024-01-07 00:23:33 +01:00
mv README.1.html out/index.html
2024-01-19 22:40:54 +01:00
- name: Mastodon Webfinger
2024-03-30 23:53:09 +01:00
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"
2024-01-19 22:40:54 +01:00
2024-01-07 00:23:33 +01:00
- 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
2024-05-02 22:34:36 +02:00
if: github.event_name == 'push'
strategy:
matrix:
2024-01-19 22:17:37 +01:00
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