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

chore: use generic ubiquity .github/workflows/deploy.yml workflow #3

Merged

Conversation

gitcoindev
Copy link
Contributor

Resolves: #712

Copy link

@whilefoo whilefoo left a comment

Choose a reason for hiding this comment

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

I think you're supposed to use this workflow according to the original issue

@gitcoindev
Copy link
Contributor Author

I think you're supposed to use this workflow according to the original issue

Aha! This is why I was struggling to run this on my fork, thank you!

@gitcoindev
Copy link
Contributor Author

gitcoindev commented Oct 6, 2023

I think you're supposed to use this workflow according to the original issue

Aha! This is why I was struggling to run this on my fork, thank you!

After initial analysis I see that since this generic workflow is located outside of the repositories, the logger app could potentially indeed use it. The workflow seems to download build artifact which is available for ubiquibot only as well.

@whilefoo @rndquu do you happen to know how was the logger app deployed before? I assumed it used https://github.com/ubiquity/ubiquibot/blob/development/.github/workflows/deploy-logger-page.yml therefore I copied it over here.

We can implement either solution, just wanted to check the right way to do this.

Solution 1) use https://github.com/ubiquity/ubiquibot/blob/development/.github/workflows/deploy-logger-page.yml (and test that it actually works here as I am quite sure cd ./log-app && npm install && npm run build does not work because build script / target is not defined in package.json)

or solution 2) use the generic workflow and configure build artifacts.

For solution 2) it would be great if you provided link to previous runs (if any) as https://github.com/ubiquity/.github/actions/workflows/deploy.yml says it has never been used before.

@rndquu
Copy link
Member

rndquu commented Oct 9, 2023

@gitcoindev

After initial analysis I see that since this generic workflow is located outside of the repositories, the logger app could potentially indeed use it.

This generic workflow can be used from any public repository across the whole github regardless of the organization the original (i.e. generic) workflow belongs to.

Do you happen to know how was the logger app deployed before?

I don't actually remember whether the logger app has ever been deployed to one of our servers (i.e. netlify instances).

or solution 2) use the generic workflow and configure build artifacts.

We should use the generic workflow.

For solution 2) it would be great if you provided link to previous runs (if any) as https://github.com/ubiquity/.github/actions/workflows/deploy.yml says it has never been used before.

We use it at least for pay.ubq.fi (example).

@gitcoindev
Copy link
Contributor Author

Great, thank you @rndquu for clarifications.

@gitcoindev gitcoindev changed the title chore: move deploy-logger-page workflow from ubiquibot repo chore: use generic deployment workflow Oct 9, 2023
@gitcoindev gitcoindev changed the title chore: use generic deployment workflow chore: use generic ubiquity .github/workflows/deploy.yml workflow Oct 9, 2023
@gitcoindev
Copy link
Contributor Author

@whilefoo @rndquu I updated the pull request to use generic workflow and opened a follow-up ticket #4 to create the build workflow. It would be best to assign the new issue to the app creator or somebody who already deployed the app. There are esbuild bundler configuration files in the scripts folder but there is no README.md on how to build and build step is missing in package.json as well.

@rndquu
Copy link
Member

rndquu commented Oct 10, 2023

@gitcoindev

Could you:

  1. Add the build script to package.json
  2. Create a build workflow similar to this one

I will setup everything else regarding the deployment to cloudflare pages because (as far as I understand) it requires access to the ubiquity's cloudflare dashboard.

@gitcoindev
Copy link
Contributor Author

@rndquu all right, I will take care of this.

@rndquu
Copy link
Member

rndquu commented Oct 10, 2023

@rndquu all right, I will take care of this.

Thank you

@gitcoindev
Copy link
Contributor Author

gitcoindev commented Oct 11, 2023

@rndquu @whilefoo I opened #5 to add the build workflow and the build script. I also had to add a few small fixes for typescript code to compile without errors. Plus I updated to the latest node and upgraded dependencies.

@rndquu rndquu merged commit f87b139 into ubiquity:development Oct 13, 2023
1 check passed
@rndquu
Copy link
Member

rndquu commented Oct 13, 2023

@rndquu @whilefoo I opened #5 to add the build workflow and the build script. I also had to add a few small fixes for typescript code to compile without errors. Plus I updated to the latest node and upgraded dependencies.

I will try to deploy it

@rndquu
Copy link
Member

rndquu commented Oct 18, 2023

@rndquu @whilefoo I opened #5 to add the build workflow and the build script. I also had to add a few small fixes for typescript code to compile without errors. Plus I updated to the latest node and upgraded dependencies.

I will try to deploy it

Right now the logger app is deployed to cloudflare pages.

We still need to:

  1. Apply "read logs" policy (i.e. merge this PR to the bot's main branch)
  2. Use bot's prod keys
  3. Use a custom domain for the logger app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move log-app to a separate repository
3 participants