Skip to content

Commit a548bb9

Browse files
committed
add mirror workflow
1 parent cf98dab commit a548bb9

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

.github/workflows/gh-pages.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@ permissions:
1010
pages: write
1111
id-token: write
1212

13+
defaults:
14+
run:
15+
shell: bash
16+
1317
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
14-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
1518
concurrency:
1619
group: "pages"
17-
cancel-in-progress: false
20+
cancel-in-progress: true
1821

1922
jobs:
2023
deploy:
@@ -46,4 +49,3 @@ jobs:
4649
- name: Deploy to GitHub Pages
4750
id: deployment
4851
uses: actions/deploy-pages@v4
49-

.github/workflows/mirror.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Mirror
2+
3+
on:
4+
push:
5+
branches:
6+
- main**
7+
workflow_dispatch:
8+
9+
jobs:
10+
codeberg:
11+
if: github.repository_owner == 'zigcc'
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
- run: |
18+
git push --tags --force https://${{ secrets.CBTOKEN }}@codeberg.org/jiacai2050/zigcc.git "refs/remotes/origin/*:refs/heads/*"

0 commit comments

Comments
 (0)