Skip to content

Commit 193fc81

Browse files
docs: remove build from GitHub Actions (#323)
Signed-off-by: David Dal Busco <david.dalbusco@outlook.com>
1 parent 8fecfa1 commit 193fc81

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

docs/guides/github-actions.mdx

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ import { defineConfig } from "@junobuild/config";
7474
export default defineConfig({
7575
satellite: {
7676
id: "qsgjb-riaaa-aaaaa-aaaga-cai", // Replace with your satellite ID
77-
source: "dist" // Replace with your build output directory
77+
source: "dist", // Replace with your build output directory
78+
predeploy: ["npm run build"] // Adjust based on your package manager
7879
}
7980
});
8081
```
@@ -113,9 +114,6 @@ jobs:
113114
- name: Install Dependencies
114115
run: npm ci
115116

116-
- name: Build
117-
run: npm run build
118-
119117
- name: Deploy to Juno
120118
uses: junobuild/juno-action@main
121119
with:
@@ -124,25 +122,39 @@ jobs:
124122
JUNO_TOKEN: ${{ secrets.JUNO_TOKEN }}
125123
```
126124
127-
Whenever code is pushed to your `main` branch, this action performs the following tasks: it checks out your repository, installs dependencies, and builds your application. It then utilizes the [junobuild/juno-action](https://github.com/junobuild/juno-action) GitHub Action to deploy your dapp.
125+
Whenever code is pushed to your `main` branch, this action performs the following tasks: it checks out your repository, installs dependencies. It then utilizes the [junobuild/juno-action](https://github.com/junobuild/juno-action) GitHub Action to build and deploy your dapp.
126+
127+
That's it—your pipeline is set! 🥳
128+
129+
---
128130

129-
Make sure to adapt the code according to your specific requirements, such as adjusting the branch name and package manager command.
131+
## Additional Notes
130132

131-
:::tip
133+
Here are some notes about the setup.
132134

133-
Before configuring the action, take the following factors into consideration:
135+
### Build
134136

135-
- **Build Reproducibility**: Only new resources will be deployed to your satellite. Changes are detected through sha256 comparison. Therefore, ensuring the build reproducibility of your application is crucial to accurately identify and deploy the necessary updates.
136-
- **Deployment Costs**: Deploying new assets consumes [cycles], and the cost increases with both the frequency of deployments and the number of items to deploy. While the above code snippet demonstrates a more frequent lifecycle, as a general recommendation, consider minimizing your deployment expenses with less frequent deployments. For instance, you can trigger the action on releases instead.
137+
If your `juno.config` file does not build your application using a `predeploy` field, you might need to add an additional step to your YAML file to do so:
138+
139+
```yaml
140+
- name: Build
141+
run: npm run build
142+
```
143+
144+
### Reproducibility
145+
146+
Only new resources will be deployed to your satellite. Changes are detected through sha256 comparison. Therefore, ensuring the build reproducibility of your application is crucial to accurately identify and deploy the necessary updates.
147+
148+
### Deployment Costs
149+
150+
Deploying new assets consumes [cycles], and the cost increases with both the frequency of deployments and the number of items to deploy. While the above code snippet demonstrates a more frequent lifecycle, as a general recommendation, consider minimizing your deployment expenses with less frequent deployments. For instance, you can trigger the action on releases instead.
137151

138152
```yaml
139153
on:
140154
release:
141155
types: [released]
142156
```
143157

144-
:::
145-
146158
[CLI]: ../miscellaneous/cli.mdx
147159
[satellite]: ../terminology.md#satellite
148160
[cycles]: ../terminology.md#cycles

0 commit comments

Comments
 (0)