mirror of
https://github.com/JonasHinterdorfer/TextAdventure.git
synced 2025-10-26 03:41:10 +00:00
added push to Gitea
This commit is contained in:
parent
2bd074c5a6
commit
abba445269
32
.github/workflows/pushtoGitea.yaml
vendored
Normal file
32
.github/workflows/pushtoGitea.yaml
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
name: Push to Gitea
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main # or your desired branch
|
||||
|
||||
jobs:
|
||||
push_to_gitea:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Git for Gitea
|
||||
run: |
|
||||
git config --global user.name "GitHub"
|
||||
git config --global user.email "repo@github.com"
|
||||
git remote add gitea "ssh://git@git.ionas999.at:9002/jonas/text-adventure.git" # Updated Gitea repo URL
|
||||
|
||||
- name: Set up SSH key for Gitea
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "${{ secrets.GITA_SECRET }}" > ~/.ssh/id_rsa # Use the 'GITA_SECRET' secret for the private key
|
||||
chmod 600 ~/.ssh/id_rsa # Ensure proper permissions for the SSH key
|
||||
ssh-keyscan git.ionas999.at >> ~/.ssh/known_hosts # Add Gitea server to known hosts
|
||||
|
||||
- name: Push to Gitea
|
||||
run: |
|
||||
git push --force gitea main # Replace 'main' with the desired branch
|
||||
|
||||
Loading…
Reference in New Issue
Block a user