xrsh-com/.forgejo/workflows/mirror_to_github.yaml

25 lines
1021 B
YAML
Raw Normal View History

2024-04-30 15:19:49 +02:00
on:
push:
branches:
- main
jobs:
mirror_to_github:
runs-on: docker
steps:
- uses: https://code.forgejo.org/actions/checkout@v3
with:
fetch-depth: 0
- run: mkdir ~/.ssh
2024-04-30 16:26:33 +02:00
- run: "echo \"${{ secrets.SSHKEY_APPS }}\" > ~/.ssh/id_rsa"
2024-04-30 15:19:49 +02:00
- run: ssh-keyscan github.com >> ~/.ssh/known_hosts # see https://gist.github.com/vikpe/34454d69fe03a9617f2b009cc3ba200b
- run: chmod 600 -R ~/.ssh
- run: git remote add github git@github.com:coderofsalvation/xrsh-apps
- run: git push github main
2024-04-30 16:39:09 +02:00
- run: git clone git@github.com:coderofsalvation/xrsh xrsh.github # now push empty commit to deploy website
2024-04-30 16:26:33 +02:00
- run: "echo \"${{ secrets.SSHKEY }}\" > ~/.ssh/id_rsa"
2024-04-30 16:39:09 +02:00
- run: cd xrsh.github
2024-04-30 16:33:08 +02:00
- run: git config --global user.email "ci@forgejo.isvery.ninja"
- run: git config --global user.name "CI@forgejo"
2024-04-30 15:53:45 +02:00
- run: git commit --allow-empty -m "website deploy triggered via xrsh-apps repo commit"
- run: git push origin main