Juno Supercharges GitHub Actions for Smoother Deployments

Juno’s latest update to GitHub Actions is making life easier for developers working on decentralised apps. The introduction of new CLI commands means setting up configurations is quicker, and improved best practices are in place to ensure smoother deployments. With a more streamlined process, deploying apps to Juno satellites is now more efficient and secure.

Automation is at the heart of these updates. Before implementing it, developers need to add a secret token to their GitHub repository or organisation, granting permission for the CI to deploy to their satellite. The process involves generating a new controller in Juno’s console, ensuring that the permission scope is limited to ‘Read-write’ to prevent GitHub from having control over smart contracts. The generated token is then saved as an encrypted secret under the key JUNO_TOKEN.

For those starting fresh, setting up a configuration file is essential. A simple command, npx juno init --minimal, generates the required file, which can be written in TypeScript, JavaScript, or JSON. The file must include a satellite ID, which uniquely identifies the project, and a source directory containing the built assets. Depending on the framework being used, the output folder varies—Next.js projects, for instance, rely on the ‘out’ directory, while Angular projects use dist/<your-project-name>/browser.

With the configuration set, the next step is to create a GitHub Action. A new YAML file named deploy.yaml is added to the .github/workflows subfolder. This file outlines the process GitHub follows when deploying updates. Every time code is pushed to the main branch, the system checks out the repository, installs dependencies, and uses junobuild/juno-action to build and deploy the application. If a predeploy field isn’t included in the configuration file, an additional step is required to ensure the application is built before deployment.

Efficiency is key when working with Juno satellites. The system is designed to deploy only new resources by comparing SHA-256 hashes, ensuring that unchanged files aren’t unnecessarily redeployed. While frequent updates keep a project up to date, they can increase costs, as each deployment consumes cycles. To optimise expenses, triggering deployments on releases instead of every commit may be a better approach.

Juno’s enhancements to GitHub Actions simplify workflows while maintaining security and efficiency. By reducing manual setup steps and improving deployment processes, developers can focus more on building their decentralised apps rather than wrestling with infrastructure. The new CLI commands, best practices, and automated processes make a compelling case for integrating these updates into ongoing projects.

Subscribe

Related articles

Blocks Can’t Forget – EU Nudges Blockchain Towards Privacy-Lite Future

European privacy regulators have issued fresh guidance that’s bound...

Everyone Pays the Same: DailyBid Flattens the DEX Playing Field

A fresh entry in the decentralised finance space is...

Oisy Gets a Bit Niftier with Fresh Wallet Tweaks

Oisy’s latest update is now live, and version 1.4...

Sonic Speeds Up Solana Token Launches with Fresh Integration

Sonic is about to make launching tokens on Solana...

Alice vs the Whale: ICP Proposal Stirs DAO Debate

A new proposal to transfer 8,805 ICP to the...
Maria Irene
Maria Irenehttp://ledgerlife.io/
Maria Irene is a multi-faceted journalist with a focus on various domains including Cryptocurrency, NFTs, Real Estate, Energy, and Macroeconomics. With over a year of experience, she has produced an array of video content, news stories, and in-depth analyses. Her journalistic endeavours also involve a detailed exploration of the Australia-India partnership, pinpointing avenues for mutual collaboration. In addition to her work in journalism, Maria crafts easily digestible financial content for a specialised platform, demystifying complex economic theories for the layperson. She holds a strong belief that journalism should go beyond mere reporting; it should instigate meaningful discussions and effect change by spotlighting vital global issues. Committed to enriching public discourse, Maria aims to keep her audience not just well-informed, but also actively engaged across various platforms, encouraging them to partake in crucial global conversations.

LEAVE A REPLY

Please enter your comment!
Please enter your name here