study_xxqg/.github/workflows/push-to-techxuexi.yml

28 lines
678 B
YAML
Raw Normal View History

2021-12-23 10:36:01 +00:00
name: push-to-techxuexi
2021-12-23 05:43:48 +00:00
on:
push:
branches:
- main
jobs:
2021-12-23 10:36:01 +00:00
push-to-techxuexi:
2021-12-23 05:43:48 +00:00
runs-on: ubuntu-18.04
steps:
- name: check
uses: actions/checkout@v2
2021-12-23 10:36:01 +00:00
with:
fetch-depth: 0
2021-12-23 05:43:48 +00:00
- name: Init
env:
DEBIAN_FRONTEND: noninteractive
run: |
git config --global user.name 'GitHub' && git config --global user.email 'noreply@github.com'
- name: Push Code
run: |
mkdir -p ~/.ssh
echo -e "${{ secrets.SSHKEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com > ~/.ssh/known_hosts
2021-12-23 05:46:31 +00:00
git push -f "git@github.com:TechXueXi/study_xxqg.git" "main:main"
2021-12-23 05:43:48 +00:00