Skip to content

Commit 5f3b428

Browse files
feat: github actions pnpm and yarn (#581)
* feat: github actions pnpm and yarn Signed-off-by: David Dal Busco <david.dalbusco@outlook.com> * 📄 Update LLMs.txt snapshot for PR review * feat: reuse github actions pnpm and yarn Signed-off-by: David Dal Busco <david.dalbusco@outlook.com> * feat: reuse github actions pnpm and yarn Signed-off-by: David Dal Busco <david.dalbusco@outlook.com> * chore: fmt Signed-off-by: David Dal Busco <david.dalbusco@outlook.com> * 📄 Update LLMs.txt snapshot for PR review --------- Signed-off-by: David Dal Busco <david.dalbusco@outlook.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 32135e8 commit 5f3b428

11 files changed

Lines changed: 573 additions & 158 deletions

File tree

.llms-snapshots/llms-full.txt

Lines changed: 166 additions & 6 deletions
Large diffs are not rendered by default.

.llms-snapshots/llms.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ Juno is your self-contained serverless platform for building full-stack web apps
121121

122122
## Guides - Github-actions
123123

124-
- [Deploy Frontend](https://juno.build/docs/guides/github-actions/deploy-frontend.mdx): This section describes how to deploy the frontend of your project using GitHub Actions. The frontend typically includes all client-side assets — such as HTML, CSS, JavaScript, and other static files—that are served to users.
125-
- [Publish Functions](https://juno.build/docs/guides/github-actions/publish-functions.mdx): This section explains how to automate the build and publication of your serverless functions using GitHub Actions. The process works for functions written in TypeScript or Rust and helps integrate function deployment into your development workflow.
126-
- [Upgrade Functions](https://juno.build/docs/guides/github-actions/upgrade-functions.mdx): We do not recommend upgrading your container directly from CI in production.
124+
- [Deploy Frontend](https://juno.build/docs/guides/github-actions/deploy-frontend.md): This section describes how to deploy the frontend of your project using GitHub Actions. The frontend typically includes all client-side assets — such as HTML, CSS, JavaScript, and other static files—that are served to users.
125+
- [Publish Functions](https://juno.build/docs/guides/github-actions/publish-functions.md): This section explains how to automate the build and publication of your serverless functions using GitHub Actions. The process works for functions written in TypeScript or Rust and helps integrate function deployment into your development workflow.
126+
- [Upgrade Functions](https://juno.build/docs/guides/github-actions/upgrade-functions.md): We do not recommend upgrading your container directly from CI in production.
127127

128128
## Guides - Nextjs
129129

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
.docusaurus/**/*
22
build/**/*
3+
4+
docs/guides/components/github-actions

docs/guides/components/deploy.mdx

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,9 @@ You can deploy using either [GitHub Actions](#github-actions-deployment) or [CLI
1414

1515
6. Add the following workflow configuration:
1616

17-
```yaml title=".github/workflows/deploy.yml"
18-
name: Deploy to Juno
19-
20-
on:
21-
workflow_dispatch:
22-
push:
23-
branches: [main]
24-
25-
jobs:
26-
deploy:
27-
runs-on: ubuntu-latest
28-
steps:
29-
- name: Check out the repo
30-
uses: actions/checkout@v4
31-
32-
- uses: actions/setup-node@v4
33-
with:
34-
node-version: 24
35-
registry-url: "https://registry.npmjs.org"
36-
37-
- name: Install Dependencies
38-
run: npm ci
39-
40-
- name: Deploy to Juno
41-
uses: junobuild/juno-action@main
42-
with:
43-
args: hosting deploy
44-
env:
45-
JUNO_TOKEN: ${{ secrets.JUNO_TOKEN }}
46-
```
17+
import Deploy from "./github-actions/deploy.mdx";
18+
19+
<Deploy />
4720

4821
### CLI deployment
4922

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
import Tabs from "@theme/Tabs";
2+
import TabItem from "@theme/TabItem";
3+
4+
<Tabs groupId="npm2yarn">
5+
<TabItem value="npm">
6+
```yaml title=".github/workflows/deploy.yml"
7+
name: Deploy to Juno
8+
9+
on:
10+
workflow_dispatch:
11+
push:
12+
branches: [main]
13+
14+
jobs:
15+
deploy:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Check out the repo
19+
uses: actions/checkout@v4
20+
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: 24
24+
registry-url: "https://registry.npmjs.org"
25+
26+
- name: Install Dependencies
27+
run: npm ci
28+
29+
- name: Deploy to Juno
30+
uses: junobuild/juno-action@main
31+
with:
32+
args: hosting deploy
33+
env:
34+
JUNO_TOKEN: ${{ secrets.JUNO_TOKEN }}
35+
```
36+
</TabItem>
37+
38+
<TabItem value="yarn" label="yarn">
39+
```yaml title=".github/workflows/deploy.yml"
40+
name: Deploy to Juno
41+
42+
on:
43+
workflow_dispatch:
44+
push:
45+
branches: [main]
46+
47+
jobs:
48+
deploy:
49+
runs-on: ubuntu-latest
50+
steps:
51+
- name: Check out the repo
52+
uses: actions/checkout@v4
53+
54+
- uses: actions/setup-node@v4
55+
with:
56+
node-version: 24
57+
registry-url: "https://registry.npmjs.org"
58+
59+
- name: Enable Corepack
60+
run: corepack enable
61+
62+
- name: Activate Yarn
63+
run: corepack prepare yarn@1.x --activate
64+
65+
- name: Install Dependencies
66+
run: yarn install --frozen-lockfile
67+
68+
- name: Deploy to Juno
69+
uses: junobuild/juno-action@main
70+
with:
71+
args: hosting deploy
72+
env:
73+
JUNO_TOKEN: ${{ secrets.JUNO_TOKEN }}
74+
```
75+
</TabItem>
76+
77+
<TabItem value="pnpm" label="pnpm">
78+
```yaml title=".github/workflows/deploy.yml"
79+
name: Deploy to Juno
80+
81+
on:
82+
workflow_dispatch:
83+
push:
84+
branches: [main]
85+
86+
jobs:
87+
deploy:
88+
runs-on: ubuntu-latest
89+
steps:
90+
- name: Check out the repo
91+
uses: actions/checkout@v4
92+
93+
- uses: actions/setup-node@v4
94+
with:
95+
node-version: 24
96+
registry-url: "https://registry.npmjs.org"
97+
98+
- uses: pnpm/action-setup@v4
99+
with:
100+
version: 10
101+
102+
- name: Install Dependencies
103+
run: pnpm i --frozen-lockfile
104+
105+
- name: Deploy to Juno
106+
uses: junobuild/juno-action@main
107+
with:
108+
args: hosting deploy
109+
env:
110+
JUNO_TOKEN: ${{ secrets.JUNO_TOKEN }}
111+
```
112+
</TabItem>
113+
114+
</Tabs>
115+
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
import Tabs from "@theme/Tabs";
2+
import TabItem from "@theme/TabItem";
3+
4+
<Tabs groupId="npm2yarn">
5+
<TabItem value="npm">
6+
```yaml title=".github/workflows/publish.yml"
7+
name: Publish Serverless Functions
8+
9+
on:
10+
workflow_dispatch:
11+
push:
12+
branches: [main]
13+
14+
jobs:
15+
deploy:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Check out the repo
19+
uses: actions/checkout@v4
20+
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: 24
24+
registry-url: "https://registry.npmjs.org"
25+
26+
- name: Install Dependencies
27+
run: npm ci
28+
29+
- name: Build
30+
uses: junobuild/juno-action@full
31+
with:
32+
args: functions build
33+
34+
- name: Publish
35+
uses: junobuild/juno-action@full
36+
with:
37+
args: functions publish
38+
env:
39+
JUNO_TOKEN: ${{ secrets.JUNO_TOKEN }}
40+
```
41+
</TabItem>
42+
43+
<TabItem value="yarn" label="yarn">
44+
```yaml title=".github/workflows/publish.yml"
45+
name: Publish Serverless Functions
46+
47+
on:
48+
workflow_dispatch:
49+
push:
50+
branches: [main]
51+
52+
jobs:
53+
deploy:
54+
runs-on: ubuntu-latest
55+
steps:
56+
- name: Check out the repo
57+
uses: actions/checkout@v4
58+
59+
- uses: actions/setup-node@v4
60+
with:
61+
node-version: 24
62+
registry-url: "https://registry.npmjs.org"
63+
64+
- name: Enable Corepack
65+
run: corepack enable
66+
67+
- name: Activate Yarn
68+
run: corepack prepare yarn@1.x --activate
69+
70+
- name: Install Dependencies
71+
run: yarn install --frozen-lockfile
72+
73+
- name: Build
74+
uses: junobuild/juno-action@full
75+
with:
76+
args: functions build
77+
78+
- name: Publish
79+
uses: junobuild/juno-action@full
80+
with:
81+
args: functions publish
82+
env:
83+
JUNO_TOKEN: ${{ secrets.JUNO_TOKEN }}
84+
```
85+
</TabItem>
86+
87+
<TabItem value="pnpm" label="pnpm">
88+
```yaml title=".github/workflows/publish.yml"
89+
name: Publish Serverless Functions
90+
91+
on:
92+
workflow_dispatch:
93+
push:
94+
branches: [main]
95+
96+
jobs:
97+
deploy:
98+
runs-on: ubuntu-latest
99+
steps:
100+
- name: Check out the repo
101+
uses: actions/checkout@v4
102+
103+
- uses: actions/setup-node@v4
104+
with:
105+
node-version: 24
106+
registry-url: "https://registry.npmjs.org"
107+
108+
- uses: pnpm/action-setup@v4
109+
with:
110+
version: 10
111+
112+
- name: Install Dependencies
113+
run: pnpm i --frozen-lockfile
114+
115+
- name: Build
116+
uses: junobuild/juno-action@full
117+
with:
118+
args: functions build
119+
120+
- name: Publish
121+
uses: junobuild/juno-action@full
122+
with:
123+
args: functions publish
124+
env:
125+
JUNO_TOKEN: ${{ secrets.JUNO_TOKEN }}
126+
```
127+
</TabItem>
128+
129+
</Tabs>
130+

0 commit comments

Comments
 (0)