Skip to content

Commit 67bb203

Browse files
committed
test ci cd
maybe now please work gh actions please work gh actions surely this time surely surely now hopefully it's the base this has to be it maybe nojeykll it must alright pls come on it has to YOU HAVE TO BE KIDDING ME NOW now should work base change dist location fix mv change routes and it works Fixed base
1 parent 952efc3 commit 67bb203

10 files changed

Lines changed: 274 additions & 8 deletions

File tree

.github/workflows/cd.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Continuous deployment
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
concurrency:
13+
group: "pages"
14+
cancel-in-progress: true
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- uses: pnpm/action-setup@v4
23+
with:
24+
version: 10
25+
26+
- run: |
27+
cd app/
28+
pnpm install
29+
pnpm build
30+
touch ./dist/.nojekyll
31+
echo "whwhat.me" > ./dist/CNAME
32+
mv ./dist ../
33+
34+
35+
- name: Upload static files as artifact
36+
id: deployment
37+
uses: actions/upload-pages-artifact@v4
38+
with:
39+
path: ./dist
40+
41+
deploy:
42+
runs-on: ubuntu-latest
43+
needs: build
44+
environment:
45+
name: github-pages
46+
url: ${{ steps.deployment.outputs.page_url }}
47+
steps:
48+
- name: Configure pages
49+
uses: actions/configure-pages@v5
50+
51+
- name: Deploy to gh pages (whwhat.me)
52+
id: deployment
53+
uses: actions/deploy-pages@v4

.github/workflows/ci.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Continuous integration
2+
on: [push, pull_request]
3+
4+
jobs:
5+
test:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v4
9+
10+
- name: Install Rust
11+
uses: actions-rs/toolchain@v1
12+
with:
13+
toolchain: stable
14+
override: true
15+
components: rustfmt, clippy
16+
17+
- name: Install Solana
18+
run: |
19+
sh -c "$(curl -sSfL https://release.solana.com/stable/install)"
20+
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
21+
solana --version
22+
23+
- name: Install Node
24+
uses: actions/setup-node@v3
25+
with:
26+
node-version: 18
27+
28+
- name: Install dependencies
29+
run: npm install
30+
31+
- name: Start local validator
32+
run: |
33+
solana-test-validator --reset --quiet &
34+
sleep 5
35+
36+
- name: Setup wallet
37+
run: |
38+
echo "$CI_CD_WALLET" > ci-wallet.json
39+
40+
- name: Run Anchor tests
41+
run: |
42+
export ANCHOR_PROVIDER_URL=http://127.0.0.1:8899
43+
export ANCHOR_WALLET=$PWD/ci-wallet.json
44+
anchor test --skip-local-validator

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ target
55
node_modules
66
test-ledger
77
.yarn
8+
.env

app/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
"private": true,
44
"version": "0.0.0",
55
"type": "module",
6+
"homepage": "http://whwhat.me/cascade",
67
"scripts": {
78
"dev": "vite",
89
"build": "tsc -b && vite build",
910
"lint": "eslint .",
10-
"preview": "vite preview"
11+
"preview": "vite preview",
12+
"predeploy": "npm run build",
13+
"deploy": "gh-pages -d dist"
1114
},
1215
"dependencies": {
1316
"@hookform/resolvers": "^5.2.2",
@@ -26,6 +29,7 @@
2629
"clsx": "^2.1.1",
2730
"date-fns": "^4.1.0",
2831
"embla-carousel-react": "^8.6.0",
32+
"gh-pages": "^6.3.0",
2933
"lucide-react": "^0.540.0",
3034
"react": "^19.1.1",
3135
"react-day-picker": "8.10.1",

app/src/main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import App from '@/App.tsx';
66

77
createRoot(document.getElementById('root')!).render(
88
<StrictMode>
9-
<BrowserRouter>
9+
<BrowserRouter basename='/cascade'>
1010
<App />
1111
</BrowserRouter>
1212
</StrictMode>,

app/tsconfig.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
"baseUrl": ".",
99
"paths": {
1010
"@/*": ["./src/*"]
11-
}
11+
},
12+
"types": ["node"],
13+
"moduleResolution": "node",
14+
"resolveJsonModule": true,
15+
"esModuleInterop": true
1216
}
1317
}

app/vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import tailwindcss from '@tailwindcss/vite';
55

66
// https://vite.dev/config/
77
export default defineConfig({
8+
base: '/cascade/',
89
plugins: [react(), tailwindcss()],
910
resolve: {
1011
alias: {

0 commit comments

Comments
 (0)