Skip to content

Conversation

@justin212407
Copy link
Member

@justin212407 justin212407 commented Jan 18, 2025

Description:

This PR resolves issue #4284 introducing a GitHub Actions workflow to automate deployment to GitHub Pages. The workflow ensures the main branch is automatically deployed to GitHub Pages on each push or pull request merge.

Changes Made:

Added Deployment Workflow:

A GitHub Actions workflow file was added in .github/workflows/deployment.yml to automate deployment to GitHub Pages. The workflow triggers on push or pull request merge into main and also includes manual deployment support.

Checklist:

  • My changes adhere to the project's contribution guidelines.
  • Code changes are implemented.

@justin212407
Copy link
Member Author

@walterbender I've been working on implementing the CI/CD pipeline for deployment, but the deployment check is failing during the actions/checkout@v2 step with the error: "Input required and not supplied: token." I've ensured the GH_TOKEN secret is configured with the correct permissions (repo, workflow) and referenced in the workflow YAML. I also deployed it on my local branch through github actions and it got deployed there. Despite these, the issue persists. Could you kindly review the workflow file and suggest any changes or fixes to resolve this?

@thebraudalf
Copy link

thebraudalf commented Jan 18, 2025

I think the CI/CD pipeline is already set up for this repository.
Your YAML is configured correctly only for Github pages only.

And to solve this issue they have to write their Environment Variables in YAML secrets.GH_TOKEN.

@justin212407
Copy link
Member Author

The CI/CD pipelines setup for this repository do not have deployment file in it. Please refer to the workflows section in the .github folder.

@walterbender
Copy link
Member

I am not sure how the token is supposed to be retrieved. We'll have to dig a bit into this.

@justin212407
Copy link
Member Author

What i did was generate a PAT from my account and then i used that to create a secret named GH_TOKEN in my forked repository which i used to here in the code to try and fetch the token. It worked back in my forked repository.

@pikurasa
Copy link
Collaborator

What i did was generate a PAT from my account and then i used that to create a secret named GH_TOKEN in my forked repository which i used to here in the code to try and fetch the token. It worked back in my forked repository.

If it's connected to a user's PAT, how do we collaborate on this?

Does each user user there own? Or do we do some security at the org level. (Please excuse my ignorance.) If there's anything you need at the org level, please let me know.

@justin212407
Copy link
Member Author

@pikurasa i am also still looking into why this deployment check is falling apart. As to how i have figured it till now it is probably as you mentioned that it's because of my PAT that this might be not working. I will try to fix it using github token. And i'll definitely contact you if i need anything.

@justin212407
Copy link
Member Author

@pikurasa I have fixed the token error that was occurring on this deployment file as informed in the meeting but now there is another issue that is arising that is we want specific files to be deployed i.e. the ones to which changes are made but right now all the files present in the codebase are getting deployed. Could you take a look at this for once?

@pikurasa
Copy link
Collaborator

Could you take a look at this for once?

What specifically do I need to look into?

@justin212407
Copy link
Member Author

@pikurasa would you like just the changed file to have a deployment test run on it or should the whole codebase be deployed to check? which one would you say is a better approach?

@justin212407 justin212407 marked this pull request as draft February 13, 2025 08:39
@justin212407 justin212407 mentioned this pull request Feb 28, 2025
4 tasks
@github-actions
Copy link
Contributor

github-actions bot commented Mar 1, 2025

✅ All Jest tests passed! This PR is ready to merge.

@justin212407
Copy link
Member Author

@walterbender @pikurasa how does this workflow look?
It is passing all the checks now. What are your comments on this?

@walterbender
Copy link
Member

walterbender commented Mar 2, 2025

So will this auto update a github.io version of musicblocks?

https://sugarlabs.github.io/musicblocks/

@justin212407
Copy link
Member Author

justin212407 commented Mar 3, 2025

@walterbender Yes that is what is to be intended with this pr. But i guess i will need you to configure a secret for me for this to work. I will update you on everything required for this to work. It might need a secret which has certain permissions.

@omsuneri
Copy link
Member

@justin212407 we are having a GH-PAT set up in our repo i had used that one in making the commen on PR but it would be better if you can use the gh CLI instead of this approach and if you can allow me to commit on this branch may be we can do it together

@omsuneri
Copy link
Member

also in order to comment on a PR you are making some errors in the workflow which will never make a comment on PR

@justin212407
Copy link
Member Author

@omsuneri Regarding the github CLI i did look into it and i have made a few changes to it locally and i will be making some commits to this PR soon. If you want you can then pull it locally and then we can work on it together.

@omsuneri
Copy link
Member

@justin212407 sure to make comment on PR I ll add some more changes to it

@justin212407
Copy link
Member Author

@omsuneri sure go ahead with that

@pikurasa
Copy link
Collaborator

@omsuneri @justin212407 What's the status on this?

@justin212407
Copy link
Member Author

This is almost ready waiting for Om's commits and then will put in some test prs to check whether this works fine and then we'll be good to go

@omsuneri
Copy link
Member

@justin212407 I will complete it in this week
Sorry for very messy schedule due to academic end session 🥲

@justin212407
Copy link
Member Author

@omsuneri I understand man, the same here. Take your time

@github-actions
Copy link
Contributor

This pull request has been open for more than 60 days without any activity. It will be closed in 3 days unless the stale label is removed or commented on.

@github-actions github-actions bot added the Stale label Jun 28, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jul 1, 2025

Closed pull request due to inactivity for more than 63 days.

@github-actions github-actions bot closed this Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants