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

feat(devx): Generate and upload references by network for documentation #4554

Open
wants to merge 20 commits into
base: develop
Choose a base branch
from

Conversation

lucas-tortora
Copy link
Contributor

@lucas-tortora lucas-tortora commented Dec 18, 2024

Description of change

Updated the docs' workflow to upload the generated APIs for the testnet and devnet branches to an AWS bucket, which can then be downloaded by the docs.

Links to any relevant issues

fixes #1432
fixes #4097

Type of change

  • Enhancement (a non-breaking change which adds functionality)

How the change has been tested

This branch uses said documentation.

Change checklist

Tick the boxes that are relevant to your changes, and delete any items that are not.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that new and existing unit tests pass locally with my changes

Modify output dir for generated rust docs
Modify output dir for generated graphql docs
Fix entry points for ts docs and updated output dir
Removed rust, graphql and ts doc generation from build and start in docs
Added generate-ts-docs and generate-graphql-docs to docs' package.json
added step that calls the download-iota-refs script
@iota-ci iota-ci added the devx Issues related to the DevX team label Dec 18, 2024
@lucas-tortora lucas-tortora added documentation Improvements or additions to documentation dx-documentation For TW or documentation related issues. labels Dec 18, 2024
@Dr-Electron
Copy link
Contributor

Didn't work for me so I pushed a fix.
Tested with act by having an event.json file at root with the following content:

{
  "ref": "develop"
}

and running:

act -W ./.github/workflows/upload-docs-to-aws.yml -e event.json

@lucas-tortora lucas-tortora marked this pull request as ready for review January 13, 2025 14:08
@lucas-tortora lucas-tortora marked this pull request as draft January 13, 2025 14:32
Copy link
Contributor

@Dr-Electron Dr-Electron left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Tested with

act -W ./.github/workflows/upload-docs-to-aws.yml -P ubuntu-latest=catthehacker/ubuntu:full-20.04 -e event.json --secret-file <(aws --profile iota-wiki configure export-credentials --format env)

where my credentials are stored in the iota-wiki profile. I also specified a s3 bucket obviously. And I had to use GitHub.ref instead of GitHub.ref_name but that seems to be an act bug 😢. Also I skipped the rust install step as the full images comes with rust pre installed.

Just one small fix, the folder name is incorrect. I will push a fix


# ----------- Build Rust Docs -----------
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this use the rust version in rust-toolchain.toml instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tbh, I'm not that familiar with GH workflows, but if you can suggest how to retrieve it, I'd be happy to add it.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can only hardcode it 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

I wanted to check how the others in the repo tho it but then remembered that we use self hosted everywhere which has rust pre-installed 😆

@Dr-Electron Dr-Electron force-pushed the devx/upload-generated-docs-to-aws branch from 080fce3 to 0da82c4 Compare January 31, 2025 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Issues related to our CI pipeline devx Issues related to the DevX team documentation Improvements or additions to documentation dx-documentation For TW or documentation related issues.
Projects
None yet
6 participants