mirror of
https://github.com/tiennm99/tiennm99.github.io.git
synced 2026-05-14 08:58:43 +00:00
feat: remove SourceHut
This commit is contained in:
-14
@@ -1,14 +0,0 @@
|
||||
image: alpine/edge
|
||||
packages:
|
||||
- hugo
|
||||
- hut
|
||||
oauth: pages.sr.ht/PAGES:RW
|
||||
environment:
|
||||
site: miti99.srht.site
|
||||
tasks:
|
||||
- package: |
|
||||
cd $site
|
||||
hugo
|
||||
tar -C public -cvz . > ../site.tar.gz
|
||||
- upload: |
|
||||
hut pages publish -d $site site.tar.gz
|
||||
@@ -117,23 +117,3 @@ jobs:
|
||||
|
||||
# Push all tags
|
||||
git push codeberg --tags --force
|
||||
|
||||
- name: Mirror to SourceHut
|
||||
run: |
|
||||
# Add SourceHut remote
|
||||
git remote add sourcehut git@git.sr.ht:~miti99/miti99.srht.site
|
||||
|
||||
# Fetch from SourceHut to get information about the default branch
|
||||
git fetch sourcehut
|
||||
|
||||
# Get list of local branches
|
||||
LOCAL_BRANCHES=$(git branch | grep -v "origin/" | tr -d '* ' | tr '\n' ' ')
|
||||
|
||||
# Push each local branch individually to SourceHut
|
||||
for branch in $LOCAL_BRANCHES; do
|
||||
# Push branch to SourceHut
|
||||
git push sourcehut $branch:$branch --force
|
||||
done
|
||||
|
||||
# Push all tags
|
||||
git push sourcehut --tags --force
|
||||
|
||||
Reference in New Issue
Block a user