Skip to content

sync docs from linyaps #44

sync docs from linyaps

sync docs from linyaps #44

Workflow file for this run

name: sync docs from linyaps
on:
schedule:
- cron: "0 5 * * 1"
workflow_dispatch:
permissions: write-all
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout linyaps pages
uses: actions/checkout@v4
with:
path: linyaps
repository: OpenAtom-Linyaps/linyaps
sparse-checkout: |
docs/pages
sparse-checkout-cone-mode: false
- name: checkout self
uses: actions/checkout@v4
with:
path: self
sparse-checkout: |
en
guide
sparse-checkout-cone-mode: false
- name: get diff
run: |
diff -Naur self linyaps/docs/pages &> changed.txt || true
if [ ! -s changed.txt ]; then
echo "No docs have been changed, terminate normally."
exit 0
fi
cp -r linyaps/docs/pages/en/* self/en/
cp -r linyaps/docs/pages/guide/* self/guide/
- name: create pr
uses: peter-evans/create-pull-request@v6
with:
path: self
commit-message: "sync docs automatically."
title: "Sync docs from linyaps"
delete-branch: true