all repos — zola-bearblog @ ef543fa36e8bbc4c56c0a666da9e438988405616

Port of bear blog theme to zola

.forgejo/workflows/mirror.yml (view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
on:
  push:
    branches:
      - main

jobs:
  mirror:
    runs-on: codeberg-tiny-lazy
    steps:
      - name: Check out the repository
        uses: actions/checkout@v6
        with:
          fetch-depth: 0

      - name: Check out the target repository
        run: |
          git clone github.com/${{ forgejo.repository }} target || {
            git init --initial-branch=${{ forgejo.ref_name }} target &&
            git remote set-url origin https://github.com/${{ forgejo.repository }}.git
          }

      - name: Filter repository
        uses: https://codeberg.org/alinnow/filter-repo-action@v1
        with:
          source: .
          target: target
          paths: |
            README.md
            LICENSE
          prune_empty: never

      - name: Push filtered repository
        run: |
          cd target
          git push --force --mirror https://${{ secrets.OTHER_FORGE_TOKEN }}@github.com/${{ forgejo.repository }}