feat: CI/CD xyz (#206)

* feat: add deploy site config

* feat: add CI deploy xyz

* chore: add build ui folder on github workflow

* fix: fix workflow

* fix: fix build UI step

* chore: added remove comment

* feat: depoloy site on xyz when push to develop

* chore: add env varibles

* chore: remove main branch for CI/CD

* chore: change variables for secrets

* chore: make explore landing page
This commit is contained in:
Camila Sosa Morales 2023-04-12 13:48:55 -03:00 committed by GitHub
parent aa98d91c7a
commit 440a80752a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 57 additions and 2 deletions

50
.github/workflows/fleek-deploy.yaml vendored Normal file
View File

@ -0,0 +1,50 @@
name: Deploy site via Fleek
on:
pull_request:
branches:
- develop
paths:
- 'ui/**'
jobs:
deploy-to-fleek:
runs-on: ubuntu-latest
env:
FLEEK_TOKEN: ${{ secrets.FLEEK_TOKEN }}
FLEEK_PROJECT_ID: ${{ secrets.FLEEK_PROJECT_ID }}
VITE_FIREBASE_API_KEY: ${{ secrets.VITE_FIREBASE_API_KEY }}
VITE_FIREBASE_AUTH_DOMAIN: ${{ secrets.VITE_FIREBASE_AUTH_DOMAIN }}
VITE_FIREBASE_PROJECT_ID: ${{ secrets.VITE_FIREBASE_PROJECT_ID }}
VITE_FIREBASE_STORAGE_BUCKET: ${{ secrets.VITE_FIREBASE_STORAGE_BUCKET }}
VITE_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.VITE_FIREBASE_MESSAGING_SENDER_ID }}
VITE_FIREBASE_APP_ID: ${{ secrets.VITE_FIREBASE_APP_ID }}
VITE_FIREBASE_MEASUREMENT_ID: ${{ secrets.VITE_FIREBASE_MEASUREMENT_ID }}
VITE_TWITTER_URL: ${{ secrets.VITE_TWITTER_URL }}
VITE_GOERLI_RPC: ${{ secrets.VITE_GOERLI_RPC }}
defaults:
run:
working-directory: ui
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Fleek CLI
run: npm i -g @fleekxyz/cli
- name: Install UI dependencies
run: yarn
- name: Build ui folder
run: yarn build
- name: Build & deploy sites
run: fleek sites deploy

5
ui/fleek.json Normal file
View File

@ -0,0 +1,5 @@
{
"id": "clg2kh5db0000mj0851w4y9xi",
"name": "nfa-dev-deploy",
"distDir": "dist"
}

View File

@ -13,8 +13,7 @@ export const App: React.FC = () => {
<ToastProvider />
<AppPage>
<Routes>
<Route path="/" element={<Home />} />
<Route path="/explore" element={<Explore />} />
<Route path="/" element={<Explore />} />
<Route path="/mint" element={<Mint />} />
<Route path="/create-ap" element={<CreateAP />} />
<Route path="/create-ap/:id" element={<CreateAP />} />

View File

@ -32,6 +32,7 @@ export const Ethereum: Ethereum.Core = {
return new ethers.Contract(contract.address, contract.abi, provider);
},
//TODO remove cause we're using ENS subgraph
async getEnsName(address) {
const ensAddresses = await alchemy.nft.getNftsForOwner(address, {
contractAddresses: [env.ens.contractAddress],