Skip to content

push-subtree

push-subtree #30

name: Update Repository
on:
repository_dispatch:
types: [push-subtree]
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout nvim repo
uses: actions/checkout@v4
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "GitHub Actions"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Clone dotfiles repo
run: |
git clone https://github.com/etherbiswas/dotfiles.git dotfiles
- name: Configure Git for dotfiles
run: |
cd dotfiles
git config user.name "GitHub Actions"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Pull latest .config/nvim from dotfiles
run: |
cd dotfiles
git pull origin hyprland
git subtree pull --prefix=.config/nvim https://github.com/etherbiswas/nvim.git lazy.nvim --squash
- name: Merge updates into nvim repo
run: |
rsync -av dotfiles/.config/nvim/ ./
rm -rf dotfiles
git add .
git commit -m "Updated from dotfiles" || echo "No changes to commit"
git push origin lazy.nvim