Skip to content

Commit

Permalink
!35 使用.GitHub Actions 可复用工作流减少代码
Browse files Browse the repository at this point in the history
Merge pull request !35 from 欧雷/master
  • Loading branch information
entropy-cloud authored and gitee-org committed Apr 6, 2024
2 parents 38e72cc + 50f69ec commit 184f9a0
Showing 1 changed file with 5 additions and 34 deletions.
39 changes: 5 additions & 34 deletions .github/workflows/sync-docs-to-community.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,10 @@ on:
paths:
- docs/*

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
sync-docs-to-community:
runs-on: ubuntu-latest
env:
NOP_PROJECT_DOCS_REPO: nop-platform/nop-entropy-docs
steps:
- name: Create temp dirs
run: mkdir docs-src docs-dist
- uses: actions/checkout@v3
with:
path: docs-src
- uses: actions/checkout@v3
with:
repository: ${{ env.NOP_PROJECT_DOCS_REPO }}
persist-credentials: false
path: docs-dist
- name: Copy docs
run: |
rm -rf docs-dist/src
mv docs-src/docs docs-dist/src
- name: Commit changes
run: |
cd docs-dist
git config --local user.email "[email protected]"
git config --local user.name "Nop Assistant"
git add .
git commit -m "chore: update docs via GitHub Actions"
- uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.NOP_PROJECT_DOCS_PAT }}
repository: ${{ env.NOP_PROJECT_DOCS_REPO }}
directory: docs-dist
force: true
uses: nop-platform/.github/.github/workflows/sync-project-docs.yml@main
with:
repo: nop-entropy-docs
secrets:
token: ${{ secrets.NOP_PROJECT_DOCS_PAT }}

0 comments on commit 184f9a0

Please sign in to comment.