mirror of
https://github.com/lmika/postlist-for-micro.blog.git
synced 2025-07-02 00:59:05 +00:00
35 lines
954 B
YAML
35 lines
954 B
YAML
---
|
|
name: 'deploy'
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: docker
|
|
steps:
|
|
- name: Cloning repo
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Setup Github remote
|
|
run: |
|
|
mkdir -p $HOME/.ssh
|
|
echo "${{ secrets.PUBLISH_TO_GITHUB_KEY }}" > $HOME/.ssh/id_rsa
|
|
ssh-keyscan -t rsa github.com >> $HOME/.ssh/known_hosts
|
|
chmod 600 $HOME/.ssh/*
|
|
chmod 700 $HOME/.ssh
|
|
git config --global user.name 'Leon Mika'
|
|
git config --global user.email 'lmika@lmika.org'
|
|
git remote add downstream git@github.com:lmika/postlist-for-micro.blog.git
|
|
- name: Push main to Github
|
|
run: |
|
|
git checkout main
|
|
git pull origin main
|
|
git push downstream main
|
|
- name: Push tags to Github
|
|
run: |
|
|
git fetch origin --tags
|
|
git push downstream --tags |