You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/github-actions.mdx
+24-12Lines changed: 24 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,8 @@ import { defineConfig } from "@junobuild/config";
74
74
exportdefaultdefineConfig({
75
75
satellite: {
76
76
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
78
79
}
79
80
});
80
81
```
@@ -113,9 +114,6 @@ jobs:
113
114
- name: Install Dependencies
114
115
run: npm ci
115
116
116
-
- name: Build
117
-
run: npm run build
118
-
119
117
- name: Deploy to Juno
120
118
uses: junobuild/juno-action@main
121
119
with:
@@ -124,25 +122,39 @@ jobs:
124
122
JUNO_TOKEN: ${{ secrets.JUNO_TOKEN }}
125
123
```
126
124
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
+
---
128
130
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
130
132
131
-
:::tip
133
+
Here are some notes about the setup.
132
134
133
-
Before configuring the action, take the following factors into consideration:
135
+
### Build
134
136
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.
0 commit comments