Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-update of CLI md from indexer repo #37

Open
WooSungD opened this issue Jun 20, 2023 · 3 comments
Open

Auto-update of CLI md from indexer repo #37

WooSungD opened this issue Jun 20, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@WooSungD
Copy link
Contributor

Could you also please open an issue for this in gh to automate this flow (effectively what @JonoPrest was referring to in discord) with the two copy paste exceptions I have noted here.
For the header may be able to use mdx and templating, otherwise will need a bit more preprocessing

Originally posted by @DenhamPreen in #35 (review)

@DenhamPreen
Copy link
Contributor

The two points I was referring to above

  • Docusaurus has a custom header snippet of metadata that is needed to show as a doc
  • The footer on what tool generates the doc isnt really needed

@WooSungD
Copy link
Contributor Author

WooSungD commented Jul 17, 2023

From chatGPT:

To automatically create a pull request (PR) on the documentation repository whenever the markdown file in the technical repository is updated, you can set up a pipeline using a continuous integration/continuous deployment (CI/CD) tool. Here's a general outline of the steps involved:

  1. Choose a CI/CD tool: Select a CI/CD tool that integrates well with your version control system (e.g., GitHub Actions, GitLab CI/CD, Jenkins, etc.). For the purpose of this explanation, let's assume you're using GitHub Actions.

  2. Create a workflow: In your technical repository, create a workflow file (e.g., .github/workflows/md-update.yml) that defines the pipeline. This workflow will trigger whenever the markdown file is updated.

  3. Configure the workflow: Within the workflow file, configure the following steps:

    • Checkout the repository: This step checks out the code from the technical repository.

    • Generate the markdown file: Run the necessary commands or scripts to autogenerate the markdown file for the CLI implementation. Make sure the generated markdown file is stored in a specific directory (e.g., docs/).

    • Set up the documentation repository: Use actions or scripts to clone the documentation repository and set it up within the workflow.

    • Copy the updated markdown file: Copy the generated markdown file from the technical repository to the appropriate location in the documentation repository.

    • Commit and push changes: Commit the changes in the documentation repository and push them to a branch.

    • Create a pull request: Use the GitHub API or a tool-specific action to create a pull request on the documentation repository, targeting the appropriate branch (e.g., main).

  4. Configure triggers: Specify the triggers for the workflow. In this case, you want the workflow to run whenever the markdown file is updated. You can use the push event with a specified path filter to trigger the workflow only when the markdown file is modified.

  5. Save and commit the workflow file: Commit the workflow file to the technical repository.

  6. Set up secrets: To ensure secure access to the documentation repository, set up secrets in the CI/CD tool to store any required authentication tokens or credentials. These secrets should be accessible within the workflow to authenticate and perform actions on the documentation repository.

  7. Test the pipeline: Make a change to the markdown file in the technical repository and push the changes. The workflow should be triggered, generating a PR on the documentation repository.

Remember to adjust the workflow and pipeline specifics based on your CI/CD tool and repositories. The steps provided give a high-level overview, and you may need to customize them to fit your exact requirements and tooling.

@WooSungD
Copy link
Contributor Author

Will prioritize this after unstealth launch

@WooSungD WooSungD added the enhancement New feature or request label Sep 1, 2023
@WooSungD WooSungD self-assigned this Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants