2025-06-25 11:47:05 +00:00
|
|
|
---
|
|
|
|
name: 'deploy'
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
2025-06-25 11:49:19 +00:00
|
|
|
- 'v*'
|
2025-06-25 11:47:05 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
runs-on: docker
|
|
|
|
steps:
|
|
|
|
- name: Cloning repo
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2025-06-25 12:12:31 +00:00
|
|
|
- name: Setup Github remote
|
2025-06-25 11:47:05 +00:00
|
|
|
run: |
|
|
|
|
mkdir -p $HOME/.ssh
|
|
|
|
echo "${{ secrets.PUBLISH_TO_GITHUB_KEY }}" > $HOME/.ssh/id_rsa
|
2025-06-25 11:55:37 +00:00
|
|
|
ssh-keyscan -t rsa github.com >> $HOME/.ssh/known_hosts
|
|
|
|
chmod 600 $HOME/.ssh/*
|
2025-06-25 11:47:05 +00:00
|
|
|
chmod 700 $HOME/.ssh
|
|
|
|
git config --global user.name 'Leon Mika'
|
|
|
|
git config --global user.email 'lmika@lmika.org'
|
2025-06-25 11:51:29 +00:00
|
|
|
git remote add downstream git@github.com:lmika/postlist-for-micro.blog.git
|
2025-06-25 12:09:09 +00:00
|
|
|
- name: Push main to Github
|
|
|
|
run: |
|
|
|
|
git checkout main
|
|
|
|
git pull origin main
|
2025-06-25 12:12:31 +00:00
|
|
|
git push downstream main
|
|
|
|
- name: Push tags to Github
|
|
|
|
run: |
|
|
|
|
git fetch origin --tags
|
|
|
|
git push downstream --tags
|