-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #530 from 0xsend/dev
deploy
- Loading branch information
Showing
38 changed files
with
1,127 additions
and
1,035 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Deploy Dev | ||
on: | ||
push: | ||
branches: [dev] | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: build-docker | ||
steps: | ||
- name: Configure SSH | ||
run: | | ||
mkdir -p ~/.ssh/ | ||
echo "$SSH_KEY" > ~/.ssh/deployer.key | ||
chmod 600 ~/.ssh/deployer.key | ||
for h in $DEPLOYMENT_TARGETS; do echo Deploying to $h && \ | ||
ssh -o ConnectTimeout=10 -o StrictHostKeyChecking=no $SSH_USER@$h \ | ||
'cd /opt/next-app-dev && docker compose pull && docker compose up -d' ; done | ||
env: | ||
SSH_USER: ${{ secrets.DEPLOYER_SSH_USER }} | ||
SSH_KEY: ${{ secrets.DEPLOYER_SSH_KEY }} | ||
DEPLOYMENT_TARGETS: ${{ secrets.DEV_DOCKER_DEPLOYMENT_TARGETS }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { SignUpScreen } from 'app/features/auth/sign-up/screen' | ||
import Head from 'next/head' | ||
import { guestOnlyGetSSP } from 'utils/guestOnly' | ||
import type { NextPageWithLayout } from '../_app' | ||
import { AuthLayout } from 'app/features/auth/layout.web' | ||
import type { InferGetServerSidePropsType } from 'next' | ||
import { getRemoteAssets } from 'utils/getRemoteAssets' | ||
import { useContext, useEffect } from 'react' | ||
import { AuthCarouselContext } from 'app/features/auth/AuthCarouselContext' | ||
|
||
export const Page: NextPageWithLayout<InferGetServerSidePropsType<typeof getServerSideProps>> = ({ | ||
images, | ||
}) => { | ||
const { carouselImages, setCarouselImages } = useContext(AuthCarouselContext) | ||
|
||
useEffect(() => { | ||
if (carouselImages.length === 0) setCarouselImages(images) | ||
}, [setCarouselImages, carouselImages, images]) | ||
|
||
return ( | ||
<> | ||
<Head> | ||
<title>Send | Sign Up</title> | ||
<meta name="description" content="Future Cash. Sign up for Send." key="desc" /> | ||
</Head> | ||
<SignUpScreen /> | ||
</> | ||
) | ||
} | ||
|
||
export const getServerSideProps = guestOnlyGetSSP(async () => { | ||
const paths = [ | ||
'app_images/auth_image_3.jpg', | ||
'app_images/auth_image_1.jpg', | ||
'app_images/auth_image_2.jpg', | ||
] | ||
const images = await getRemoteAssets(paths) | ||
return { props: { images } } | ||
}) | ||
|
||
Page.getLayout = (children) => <AuthLayout>{children}</AuthLayout> | ||
|
||
export default Page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { getPlaiceholderImage } from 'app/utils/getPlaiceholderImage' | ||
|
||
export async function getRemoteAssets(paths: string[] = []) { | ||
const remoteImageUrl = 'https://github.com/0xsend/assets/blob/main/' | ||
const remoteImageUrl = 'https://ghassets.send.app/' | ||
const imagePromises = paths.map((path) => getPlaiceholderImage(remoteImageUrl + path)) | ||
return await Promise.all(imagePromises) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.