From 84636382578e574a8878d8e38934b38839e38eca Mon Sep 17 00:00:00 2001 From: "Dr. Jan Philip Bernius" Date: Mon, 8 Jan 2024 18:08:09 +0100 Subject: [PATCH] ci: mirror to gitlab.com and code.bernius.net --- .github/workflows/man.yaml | 35 +++++++++++++++++++++++++++++++++++ README.md | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/.github/workflows/man.yaml b/.github/workflows/man.yaml index 6a1d557..e4efc97 100644 --- a/.github/workflows/man.yaml +++ b/.github/workflows/man.yaml @@ -24,6 +24,9 @@ jobs: 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 @@ -39,3 +42,35 @@ jobs: - 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"] + + 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 diff --git a/README.md b/README.md index 1c06e1c..b59ff8d 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ Taught the courses Introduction to Software Engineering (~2,200 students), Patte ## ACKNOWLEDGEMENTS This `man` style personal page is inspired by Major Haydens [major_hayden(1)] entry. -the [jpbernius(1)] page is rendered from Markdown using [ronn]. +The [jpbernius(1)] page is rendered from Markdown using [ronn]. [major_hayden(1)]: https://majorhayden.com [jpbernius(1)]: https://jpbernius.com