Skip to content

Commit

Permalink
Feat/merge doc dev portal (#283)
Browse files Browse the repository at this point in the history
* add token in action
  • Loading branch information
RamyEB authored Jan 8, 2024
1 parent 46ddd57 commit 8b05dc1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/sync_doc_devportal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,25 @@ jobs:
- name: Sync files to the other repository and create Pull Request
env:
SYNC_DEV_PORTAL_TOKEN: ${{ secrets.SYNC_DEV_PORTAL_TOKEN }}
DEVELOPER_PORTAL_CI_TOKEN: ${{ secrets.DEVELOPER_PORTAL_CI }}
SOURCE_REPO_NAME: "wallet-api"
SOURCE_REPO: "github.com/LedgerHQ/wallet-api"
SOURCE_REPO: "https://github.com/LedgerHQ/wallet-api"
SOURCE_FILE_PATH_1: "apps/docs/pages/APIs/wallet-api"
SOURCE_FILE_PATH_2: "apps/docs/pages/docs/discover"
TARGET_REPO_NAME: "developer-portal"
TARGET_REPO: "github.com/LedgerHQ/developer-portal"
TARGET_REPO: "https://github.com/LedgerHQ/developer-portal"
TARGET_FILE_PATH_1: "pages/APIs/wallet-api"
TARGET_FILE_PATH_2: "pages/docs/discover"
TARGET_BRANCH: "main"
TARGET_PR_API_URL: "https://api.github.com/repos/LedgerHQ/developer-portal/pulls"
PR_TITLE: "Merging documentation from wallet-api"
PR_COMMIT_MESSAGE: "doc: add new changes from wallet-api doc"
PR_BRANCH_NAME: sync-discover-doc-$(date +%s)
PR_REVIEWERS: '{"reviewers": ["cfranceschi-ledger"]}'
PR_ASSIGN: '{"assignees": ["ramyeb"]}'
run: |
git clone --depth 1 https://${SYNC_DEV_PORTAL_TOKEN}@${SOURCE_REPO}
git clone --depth 1 https://${SYNC_DEV_PORTAL_TOKEN}@${TARGET_REPO}
git clone --depth 1 https://${DEVELOPER_PORTAL_CI_TOKEN}@${SOURCE_REPO}
git clone --depth 1 https://${DEVELOPER_PORTAL_CI_TOKEN}@${TARGET_REPO}
PR_BRANCH_NAME= sync-discover-doc-$(date +%s)
cd ${TARGET_REPO_NAME}
git checkout -b ${PR_BRANCH_NAME}
Expand All @@ -58,18 +58,18 @@ jobs:
git push origin ${PR_BRANCH_NAME}
# Create Pull Request
PR_RESPONSE=$(curl -X POST -H "Authorization: token ${SYNC_DEV_PORTAL_TOKEN}" \
-d '{"title":"${PR_TITLE}","head":"'"$PR_BRANCH_NAME"'","base":"${TARGET_BRANCH}"}' \
PR_RESPONSE=$(curl -X POST -H "Authorization: token ${DEVELOPER_PORTAL_CI_TOKEN}" \
-d '{"title":"${PR_TITLE}","head":"'"$PR_BRANCH_NAME}"'","base":"${TARGET_BRANCH}"}' \
${TARGET_PR_API_URL})
PR_URL=$(echo $PR_RESPONSE | jq -r '.url')
PR_ISSUE_URL=$(echo $PR_RESPONSE | jq -r '.issue_url')
# Assign Reviewers
curl -s -X POST -H "Authorization: token ${SYNC_DEV_PORTAL_TOKEN}" \
curl -s -X POST -H "Authorization: token ${DEVELOPER_PORTAL_CI_TOKEN}" \
-d "$PR_REVIEWERS" \
${PR_URL}/requested_reviewers
# Assign Users to the Pull Request
curl -s -X POST -H "Authorization: token ${SYNC_DEV_PORTAL_TOKEN}" \
curl -s -X POST -H "Authorization: token ${DEVELOPER_PORTAL_CI_TOKEN}" \
-d "$PR_ASSIGN" \
${PR_ISSUE_URL}/assignees
18 changes: 9 additions & 9 deletions apps/docs/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module.exports = {
extends: ["custom/next"],
parserOptions: {
project: ["./tsconfig.json"],
tsconfigRootDir: __dirname,
babelOptions: {
presets: [require.resolve("next/babel")], // https://github.com/vercel/next.js/issues/40687#issuecomment-1264177674
},
extends: ["custom/next"],
parserOptions: {
project: ["./tsconfig.json"],
tsconfigRootDir: __dirname,
babelOptions: {
presets: [require.resolve("next/babel")], // https://github.com/vercel/next.js/issues/40687#issuecomment-1264177674
},
rules: {},
};
},
rules: {},
};

2 comments on commit 8b05dc1

@vercel
Copy link

@vercel vercel bot commented on 8b05dc1 Jan 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

wallet-api – ./apps/docs

wallet-api-git-main-ledgerhq.vercel.app
wallet-api-ledgerhq.vercel.app
wallet.api.live.ledger.com

@vercel
Copy link

@vercel vercel bot commented on 8b05dc1 Jan 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

wallet-api-wallet-api-tools – ./apps/wallet-api-tools

wallet-api-wallet-api-tools-ledgerhq.vercel.app
wallet-api-wallet-api-tools-git-main-ledgerhq.vercel.app
wallet-api-wallet-api-tools.vercel.app

Please sign in to comment.