Skip to content

Commit 9029d42

Browse files
authored
Support deploying to fleek(#638)
* Add support for decentralized hosting
1 parent ff8f824 commit 9029d42

File tree

5 files changed

+464
-5
lines changed

5 files changed

+464
-5
lines changed

.github/workflows/ci.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ jobs:
4343
- run: yarn install --frozen-lockfile --verbose --network-concurrency 1
4444

4545
- run: yarn build
46+
- name: Upload frontend build
47+
uses: actions/upload-artifact@v4
48+
with:
49+
name: frontend
50+
path: |
51+
frontend/dist/spa
52+
fleek.config.ts
4653
tests:
4754
runs-on: ubuntu-latest
4855
steps:
@@ -152,3 +159,24 @@ jobs:
152159
cd contracts-periphery
153160
scopelint --version
154161
scopelint check
162+
163+
deploy-to-fleek:
164+
needs: [build]
165+
runs-on: ubuntu-latest
166+
env:
167+
FLEEK_TOKEN: ${{ secrets.FLEEK_TOKEN }}
168+
FLEEK_PROJECT_ID: ${{ secrets.FLEEK_PROJECT_ID }}
169+
steps:
170+
- name: Download frontend
171+
uses: actions/download-artifact@v4
172+
with:
173+
name: frontend
174+
- uses: volta-cli/action@v4
175+
with:
176+
cache: false
177+
- name: Look at directory
178+
run: ls -la
179+
- name: Install Fleek CLI
180+
run: volta run yarn global add @fleekxyz/cli
181+
- name: Build & deploy sites
182+
run: volta run fleek sites deploy

fleek.config.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { FleekConfig } from '@fleekxyz/cli';
2+
3+
export default {
4+
"sites": [
5+
{
6+
"slug": "many-island-colossal",
7+
"distDir": "./frontend/dist/spa"
8+
}
9+
]
10+
} satisfies FleekConfig;

netlify.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build]
22
publish="frontend/dist/spa/"
3-
environment = { NODE_VERSION = "16.15.0", YARN_VERSION = "1.22.18"}
3+
environment = { NODE_VERSION = "18.17.0", YARN_VERSION = "1.22.18"}
44
command = "yarn build-frontend"
55
[build.processing]
6-
skip_processing = true
6+
skip_processing = true

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"devDependencies": {
2020
"eslint": "^7.14.0",
2121
"eslint-config-prettier": "^6.14.0",
22+
"@fleekxyz/cli": "0.7.2",
2223
"husky": "^4.3.0",
2324
"lerna": "^3.22.1",
2425
"lint-staged": "^10.5.1",

0 commit comments

Comments
 (0)