Skip to content

.github/workflows/sync.yaml #202

.github/workflows/sync.yaml

.github/workflows/sync.yaml #202

Workflow file for this run

on:
schedule:
# Run once a day, shortly after midnight UTC
- cron: "15 0 * * *"
push:
branches:
- main
jobs:
sync_with_gitee:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Checkout
with:
repository: openharmony-rs/openharmony-docs
fetch-depth: '0'
lfs: true
token: ${{secrets.OPENHARMONY_DOCS_CI_PUSH_TOKEN}}
path: docs
- name: Add remote
run: git remote add gitee https://gitee.com/openharmony/docs.git
working-directory: docs
- name: Update locally
run: |
git fetch gitee
git fetch --tags
working-directory: docs
- name: Push
run: git push origin +refs/remotes/gitee/*:refs/heads/* +refs/tags/*:refs/tags/*
working-directory: docs
- name: Git lfs
run: |
git lfs fetch gitee --all
git lfs push origin --all
working-directory: docs