Skip to content

Commit

Permalink
ci: add sync CI
Browse files Browse the repository at this point in the history
  • Loading branch information
KermanX authored Aug 14, 2024
1 parent cccdb99 commit 4ab9488
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/sync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Auto Sync

on:
schedule:
- cron: '0 0 * * *' # At 00:00. https://crontab.guru/
workflow_dispatch: # on button click

jobs:
sync:
runs-on: ubuntu-latest
permissions:
contents: write # 'write' access to repository contents
steps:
- name: Install git-filter-repo
run: |
sudo apt-get update
sudo apt-get install -y git-filter-repo
- name: Checkout upstram
uses: actions/checkout@v2
with:
repository: slidevjs/slidev
fetch-depth: 0

- name: Extract docs
run: git filter-repo --subdirectory-filter docs --force

- name: Push changes
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: refs/heads/upstream

0 comments on commit 4ab9488

Please sign in to comment.