Skip to content

Commit

Permalink
Merge pull request #291 from rsksmart/testDevportalAutoImp
Browse files Browse the repository at this point in the history
fix/error on title field
  • Loading branch information
SebasGuaquetaRSK authored Dec 18, 2024
2 parents 9c5726a + bb59be3 commit 685be6d
Show file tree
Hide file tree
Showing 3 changed files with 199 additions and 327 deletions.
230 changes: 198 additions & 32 deletions .github/workflows/devportal-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_ENV
git clone https://github.com/rsksmart/devportal.git
cat devportal/docs/02-developers/06-integrate/01-rif-relay/integrate.md
cd devportal
git checkout -b ${BRANCH_NAME} || git checkout ${BRANCH_NAME}
cd ..
Expand All @@ -37,40 +36,207 @@ jobs:
mkdir -p transformed
# Remove the unwanted first lines from README.md
tail -n +1 README.md > temp_README.md
# Remove the lines between <!--START and <!--END-->
# awk '/<!--START/,/<!--END-->/{next} {print}' README.md > temp_README.md
TEMP_FILE="temp_README.md"
tail -n +1 README.md > ${TEMP_FILE}
# Process main README.md
echo "---" > transformed/README.md
echo "sidebar_label: Overview" >> transformed/README.md
echo "sidebar_position: 100" >> transformed/README.md
echo "title: RIF Relay - Overview" >> transformed/README.md
echo "description: 'RIF Relay Overview.'" >> transformed/README.md
echo "tags: [rif, envelope, relay, integrate, integration guide]" >> transformed/README.md
echo "---" >> transformed/README.md
echo "" >> transformed/README.md
echo ":::info[Note]" >> transformed/README.md
echo "If you wish to suggest changes on this document, please open a PR on the [Rif Relay Repository](https://github.com/rsksmart/rif-relay.git)" >> transformed/README.md
echo ":::" >> transformed/README.md
echo "" >> transformed/README.md
cat temp_README.md >> transformed/README.md
cp transformed/README.md devportal/docs/02-developers/06-integrate/01-rif-relay/overview.md
TRANSFORMED_FILE="transformed/README.md"
echo "---" > ${TRANSFORMED_FILE}
echo "sidebar_label: Overview" >> ${TRANSFORMED_FILE}
echo "sidebar_position: 100" >> ${TRANSFORMED_FILE}
echo "title: RIF Relay - Overview" >> ${TRANSFORMED_FILE}
echo "description: 'RIF Relay Overview.'" >> ${TRANSFORMED_FILE}
echo "tags: [rif, envelope, relay, integrate, integration guide]" >> ${TRANSFORMED_FILE}
echo "---" >> ${TRANSFORMED_FILE}
echo "" >> ${TRANSFORMED_FILE}
echo ":::info[Note]" >> ${TRANSFORMED_FILE}
echo "If you wish to suggest changes on this document, please open a PR on the [Rif Relay Repository](https://github.com/rsksmart/rif-relay.git)" >> ${TRANSFORMED_FILE}
echo ":::" >> ${TRANSFORMED_FILE}
echo "" >> ${TRANSFORMED_FILE}
cat ${TEMP_FILE} >> ${TRANSFORMED_FILE}
# Clean up temporary file
rm ${TEMP_FILE}
cp ${TRANSFORMED_FILE} devportal/docs/02-developers/06-integrate/01-rif-relay/overview.md
# Process integrations section
TEMP_FILE="temp_integrate.md"
TRANSFORMED_FILE="transformed/integrate.md"
# Remove the unwanted first lines from section (title)
tail -n +2 docs/integrate.md > ${TEMP_FILE}
echo "---" > ${TRANSFORMED_FILE}
echo "sidebar_label: Integrations" >> ${TRANSFORMED_FILE}
echo "sidebar_position: 200" >> ${TRANSFORMED_FILE}
echo "title: RIF Relay Integration" >> ${TRANSFORMED_FILE}
echo "description: 'Integrating RIF Relay in a dApp.'" >> ${TRANSFORMED_FILE}
echo "tags: [rif, envelope, relay, integration guide]" >> ${TRANSFORMED_FILE}
echo "---" >> ${TRANSFORMED_FILE}
echo "" >> ${TRANSFORMED_FILE}
cat ${TEMP_FILE} >> ${TRANSFORMED_FILE}
# Clean up temporary file
rm ${TEMP_FILE}
cp ${TRANSFORMED_FILE} devportal/docs/02-developers/06-integrate/01-rif-relay/integrate.md
# Process setup section
TEMP_FILE="temp_installation-requirements.md"
TRANSFORMED_FILE="transformed/installation-requirements.md"
# Remove the unwanted first lines from section (title)
tail -n +2 docs/installation-requirements.md > ${TEMP_FILE}
echo "---" > ${TRANSFORMED_FILE}
echo "sidebar_label: Setup" >> ${TRANSFORMED_FILE}
echo "sidebar_position: 300" >> ${TRANSFORMED_FILE}
echo "title: RIF Relay Installation Requirements" >> ${TRANSFORMED_FILE}
echo "description: 'Requirements for installing RIF Relay.'" >> ${TRANSFORMED_FILE}
echo "tags: [rif, envelope, relay, user, guide]" >> ${TRANSFORMED_FILE}
echo "---" >> ${TRANSFORMED_FILE}
echo "" >> ${TRANSFORMED_FILE}
cat ${TEMP_FILE} >> ${TRANSFORMED_FILE}
# Clean up temporary file
rm ${TEMP_FILE}
cp ${TRANSFORMED_FILE} devportal/docs/02-developers/06-integrate/01-rif-relay/installation-requirements.md
# Process sample dapp section
TEMP_FILE="temp_sample-dapp.md"
TRANSFORMED_FILE="transformed/sample-dapp.md"
# Remove the unwanted first lines from section (title)
tail -n +2 docs/sample-dapp.md > ${TEMP_FILE}
echo "---" > ${TRANSFORMED_FILE}
echo "sidebar_label: RIF Relay Sample dApp" >> ${TRANSFORMED_FILE}
echo "sidebar_position: 400" >> ${TRANSFORMED_FILE}
echo "title: How to use the RIF Relay Sample dApp SDK" >> ${TRANSFORMED_FILE}
echo "description: 'RIF Relay Sample dApp SDK Starter kit.'" >> ${TRANSFORMED_FILE}
echo "tags: [rif, envelope, relay, integration guide]" >> ${TRANSFORMED_FILE}
echo "---" >> ${TRANSFORMED_FILE}
echo "" >> ${TRANSFORMED_FILE}
cat ${TEMP_FILE} >> ${TRANSFORMED_FILE}
# Clean up temporary file
rm ${TEMP_FILE}
cp ${TRANSFORMED_FILE} devportal/docs/02-developers/06-integrate/01-rif-relay/sample-dapp.md
# Process deployment section
TEMP_FILE="temp_deployment.md"
TRANSFORMED_FILE="transformed/deployment.md"
# Remove the unwanted first lines from section (title)
tail -n +2 docs/deployment.md > ${TEMP_FILE}
echo "---" > ${TRANSFORMED_FILE}
echo "sidebar_label: RIF Relay Deployment" >> ${TRANSFORMED_FILE}
echo "sidebar_position: 500" >> ${TRANSFORMED_FILE}
echo "title: RIF Relay Deployment" >> ${TRANSFORMED_FILE}
echo "description: 'RIF Relay deployment process.'" >> ${TRANSFORMED_FILE}
echo "tags: [rif, envelope, relay, integration guide]" >> ${TRANSFORMED_FILE}
echo "---" >> ${TRANSFORMED_FILE}
echo "" >> ${TRANSFORMED_FILE}
cat ${TEMP_FILE} >> ${TRANSFORMED_FILE}
# Clean up temporary file
rm ${TEMP_FILE}
cp ${TRANSFORMED_FILE} devportal/docs/02-developers/06-integrate/01-rif-relay/deployment.md
# Process develop section
TEMP_FILE="temp_develop.md"
TRANSFORMED_FILE="transformed/develop.md"
# Remove the unwanted first lines from section (title)
tail -n +2 docs/develop.md > ${TEMP_FILE}
echo "---" > ${TRANSFORMED_FILE}
echo "sidebar_label: Develop" >> ${TRANSFORMED_FILE}
echo "sidebar_position: 600" >> ${TRANSFORMED_FILE}
echo "title: RIF Relay Develop" >> ${TRANSFORMED_FILE}
echo "description: 'RIF Relay deployment process.'" >> ${TRANSFORMED_FILE}
echo "tags: [rif, envelope, relay, user, guide]" >> ${TRANSFORMED_FILE}
echo "---" >> ${TRANSFORMED_FILE}
echo "" >> ${TRANSFORMED_FILE}
cat ${TEMP_FILE} >> ${TRANSFORMED_FILE}
# Clean up temporary file
rm ${TEMP_FILE}
cp ${TRANSFORMED_FILE} devportal/docs/02-developers/06-integrate/01-rif-relay/develop.md
# Process contracts section
TEMP_FILE="temp_contracts.md"
TRANSFORMED_FILE="transformed/contracts.md"
# Remove the unwanted first lines from section (title)
tail -n +2 docs/contracts.md > ${TEMP_FILE}
echo "---" > ${TRANSFORMED_FILE}
echo "sidebar_label: Contracts" >> ${TRANSFORMED_FILE}
echo "sidebar_position: 700" >> ${TRANSFORMED_FILE}
echo "title: RIF Relay - Contracts" >> ${TRANSFORMED_FILE}
echo "description: 'RIF Relay Contracts.'" >> ${TRANSFORMED_FILE}
echo "tags: [rif, envelope, relay, integrate]" >> ${TRANSFORMED_FILE}
echo "---" >> ${TRANSFORMED_FILE}
echo "" >> ${TRANSFORMED_FILE}
cat ${TEMP_FILE} >> ${TRANSFORMED_FILE}
# Clean up temporary file
rm ${TEMP_FILE}
cp ${TRANSFORMED_FILE} devportal/docs/02-developers/06-integrate/01-rif-relay/contracts.md
# Process smart wallets section
TEMP_FILE="temp_smart-wallets.md"
TRANSFORMED_FILE="transformed/smart-wallets.md"
# Remove the unwanted first lines from section (title)
tail -n +2 docs/smart-wallets.md > ${TEMP_FILE}
echo "---" > ${TRANSFORMED_FILE}
echo "sidebar_label: Smart Wallets" >> ${TRANSFORMED_FILE}
echo "sidebar_position: 800" >> ${TRANSFORMED_FILE}
echo "title: RIF Relay Smart Wallets" >> ${TRANSFORMED_FILE}
echo "description: 'RIF Relay Smart Wallets.'" >> ${TRANSFORMED_FILE}
echo "tags: [rif, envelope, relay, user, guide]" >> ${TRANSFORMED_FILE}
echo "---" >> ${TRANSFORMED_FILE}
echo "" >> ${TRANSFORMED_FILE}
cat ${TEMP_FILE} >> ${TRANSFORMED_FILE}
# Clean up temporary file
rm ${TEMP_FILE}
cp ${TRANSFORMED_FILE} devportal/docs/02-developers/06-integrate/01-rif-relay/smart-wallets.md
# Process versions section
TEMP_FILE="temp_versions.md"
TRANSFORMED_FILE="transformed/versions.md"
# Remove the unwanted first lines from section (title)
tail -n +2 docs/versions.md > ${TEMP_FILE}
echo "---" > ${TRANSFORMED_FILE}
echo "sidebar_label: Versions" >> ${TRANSFORMED_FILE}
echo "sidebar_position: 900" >> ${TRANSFORMED_FILE}
echo "title: RIF Relay Versions" >> ${TRANSFORMED_FILE}
echo "description: 'RIF Relay Versions.'" >> ${TRANSFORMED_FILE}
echo "tags: [rif, envelope, rif relay, integration guide]" >> ${TRANSFORMED_FILE}
echo "---" >> ${TRANSFORMED_FILE}
echo "" >> ${TRANSFORMED_FILE}
cat ${TEMP_FILE} >> ${TRANSFORMED_FILE}
# Clean up temporary file
rm ${TEMP_FILE}
cp ${TRANSFORMED_FILE} devportal/docs/02-developers/06-integrate/01-rif-relay/versions.md
# Process gas costs section
TEMP_FILE="temp_gas-costs.md"
TRANSFORMED_FILE="transformed/gas-costs.md"
# Remove the unwanted first lines from section (title)
tail -n +2 docs/gas-costs.md > ${TEMP_FILE}
echo "---" > ${TRANSFORMED_FILE}
echo "sidebar_label: Gas Costs" >> ${TRANSFORMED_FILE}
echo "sidebar_position: 950" >> ${TRANSFORMED_FILE}
echo "title: RIF Relay - Gas Costs" >> ${TRANSFORMED_FILE}
echo "description: 'RIF Relay Gas Costs.'" >> ${TRANSFORMED_FILE}
echo "tags: [rif, envelope, relay, integrate]" >> ${TRANSFORMED_FILE}
echo "---" >> ${TRANSFORMED_FILE}
echo "" >> ${TRANSFORMED_FILE}
cat ${TEMP_FILE} >> ${TRANSFORMED_FILE}
# Clean up temporary file
rm ${TEMP_FILE}
cp ${TRANSFORMED_FILE} devportal/docs/02-developers/06-integrate/01-rif-relay/gas-costs.md
# Process architecture section
TEMP_FILE="temp_architecture.md"
TRANSFORMED_FILE="transformed/architecture.md"
# Remove the unwanted first lines from section (title)
tail -n +2 docs/integrate.md > temp_integrate.md
echo "---" > transformed/integrate.md
echo "sidebar_label: Integrations" >> transformed/integrate.md
echo "sidebar_position: 200" >> transformed/integrate.md
echo "title: RIF Relay Integration" >> transformed/integrate.md
echo "description: 'Integrating RIF Relay in a dApp.'" >> transformed/integrate.md
echo "tags: [rif, envelope, relay, integration guide]" >> transformed/integrate.md
echo "---" >> transformed/integrate.md
echo "" >> transformed/integrate.md
cat temp_integrate.md >> transformed/integrate.md
cp transformed/integrate.md devportal/docs/02-developers/06-integrate/01-rif-relay/integrate.md
tail -n +2 docs/architecture.md > ${TEMP_FILE}
echo "---" > ${TRANSFORMED_FILE}
echo "sidebar_label: Architecture" >> ${TRANSFORMED_FILE}
echo "sidebar_position: 980" >> ${TRANSFORMED_FILE}
echo "title: RIF Relay - Architecture" >> ${TRANSFORMED_FILE}
echo "description: 'RIF Relay Architeture.'" >> ${TRANSFORMED_FILE}
echo "tags: [rif, envelope, relay, integrate]" >> ${TRANSFORMED_FILE}
echo "---" >> ${TRANSFORMED_FILE}
echo "" >> ${TRANSFORMED_FILE}
cat ${TEMP_FILE} >> ${TRANSFORMED_FILE}
# Clean up temporary file
rm ${TEMP_FILE}
cp ${TRANSFORMED_FILE} devportal/docs/02-developers/06-integrate/01-rif-relay/architecture.md
# Step 3: Commit and Push Changes to Devportal Repository
- name: Commit and Push Changes
Expand All @@ -80,7 +246,7 @@ jobs:
cd devportal
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add docs/02-developers/06-integrate/01-rif-relay/overview.md docs/02-developers/06-integrate/01-rif-relay/integrate.md
git add docs/02-developers/06-integrate/01-rif-relay/overview.md docs/02-developers/06-integrate/01-rif-relay/integrate.md docs/02-developers/06-integrate/01-rif-relay/installation-requirements.md docs/02-developers/06-integrate/01-rif-relay/sample-dapp.md docs/02-developers/06-integrate/01-rif-relay/deployment.md docs/02-developers/06-integrate/01-rif-relay/develop.md docs/02-developers/06-integrate/01-rif-relay/contracts.md docs/02-developers/06-integrate/01-rif-relay/smart-wallets.md docs/02-developers/06-integrate/01-rif-relay/versions.md docs/02-developers/06-integrate/01-rif-relay/gas-costs.md docs/02-developers/06-integrate/01-rif-relay/architecture.md
git commit -m "Automated update from repository"
# Configure the remote URL with the token for authentication
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/rsksmart/devportal.git
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ Each module has instructions for development and usage.
* Please refer to the Rootstock Contribution Guidelines for more information on how to contribute to this project.

## License:
MIT License - Copyright (c) 2023 Rootstock
MIT License - Copyright (c) 2023 Rootstock
Loading

0 comments on commit 685be6d

Please sign in to comment.