Skip to content

Commit

Permalink
👷 (doc): Sync doc with ledgerhq/developer-portal
Browse files Browse the repository at this point in the history
  • Loading branch information
valpinkman committed Jan 13, 2025
1 parent da36309 commit acb66cd
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/sync_doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: "[Automation] Sync Doc"
on:
push:
branches:
- chore/no-issue-sync-doc-to-portal
paths:
- "apps/docs/pages/docs/*"

jobs:
sync_doc:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
path: ldmk
sparse-checkout: |
apps/docs/pages/docs
- uses: actions/checkout@v4
with:
repository: ledgerhq/developer-portal
path: portal

- name: Set up Git
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
- name: Copy files
run: |
rm -rf portal/pages/docs/device-interaction
mkdir -p portal/pages/docs/device-interaction
cp -r ldmk/apps/docs/pages/docs/* portal/pages/docs/device-interaction
- name: Set branch name in outputs
id: branch-name
run: |
branch_name="sync-dmk-doc-$(date +%Y-%m-%d-%H-%M)"
echo "BRANCH_NAME=$branch_name" >> $GITHUB_OUTPUT
- name: Commit changes
run: |
cd portal
# add timestamp to commit message
git checkout -b ${{ steps.branch-name.outputs.BRANCH_NAME }}
git add pages/docs/device-interaction
git commit -m "doc: add new changes from device management kit to portal"
- name: Create pull request
run: |
cd portal
gh pr create --title "doc: add new changes from device management kit to portal" --base develop --head ${{ steps.branch-name.outputs.BRANCH_NAME }}

0 comments on commit acb66cd

Please sign in to comment.