Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

[Sweep GHA Fix] Fix the failing GitHub Actions #6578

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build and Deploy

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 14

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

deploy:
needs: build
runs-on: ubuntu-latest

steps:
- name: Deploy to staging
uses: some-deployment-action@v1
with:
environment: staging
api-key: ${{ secrets.STAGING_API_KEY }}
region: us-west

- name: Deploy to production
uses: some-deployment-action@v1
with:
environment: production
api-key: ${{ secrets.PRODUCTION_API_KEY }}
region: us-east
2 changes: 1 addition & 1 deletion documents/development-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ content: {
// best practice
content: {
text: '_t_Our GitHub repositories: <0>github.com/binary-com</0>_t_',
components: [<br key={0} />],
components: [<Header key={0} type="br"/>],
}

<Header as="p">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/partners/_why-choose-us.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import React, { useState } from 'react'
import styled from 'styled-components'
import { Container, Flex, SectionContainer } from 'components/containers'
import { Header, Text } from 'components/elements'
Expand Down
4 changes: 2 additions & 2 deletions src/pages/partners/payment-agent/_who-can-apply.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import React, { useState } from 'react'
import styled from 'styled-components'
import {
StyledSection,
Expand Down Expand Up @@ -33,7 +33,7 @@ type StyledLinkButtonProps = {
id?: string
}

const StyledLinkButton = styled(LinkButton)<StyledLinkButtonProps>``
const StyledLinkButton = styled(LinkButton)``

const HeaderHowToApply = styled(SecondaryHeader)`
@media ${device.tablet} {
Expand Down
62 changes: 60 additions & 2 deletions src/pages/reset-password/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,19 @@
margin-top: 2rem;
`

const InputGroup = styled.div`
const InputGroup = styled.div`width: 100%;
margin: 0 auto 3.4rem;
max-width: 40rem;
@media ${device.tabletL} {
width: 90%;
}
width: 100%;
margin: 0 auto 3.4rem;
max-width: 40rem;
@media ${device.tabletL} {
width: 90%;
}

width: 40rem;
margin: 0 auto 3.4rem;
@media ${device.tabletL} {
Expand All @@ -40,7 +52,53 @@
margin: 0.8rem 0.4rem;
`

const ResetPassword = () => {
const ResetPassword = ({ children }) => {

Check failure on line 55 in src/pages/reset-password/index.tsx

View workflow job for this annotation

GitHub Actions / lint

'children' is missing in props validation
const inputRef = React.useRef(null);
const [apiError, setApiError] = useState<string | null>('');
const initialValues: EmailType = { email: '' };

const resetSubmission = (values: EmailType, actions) => {
apiManager
.augmentedSend('verify_email', {
verify_email: trimSpaces(values.email),
type: 'reset_password',
})
.then((response) => {
actions.setSubmitting(false);

if (response.error) {
actions.setStatus({
error: response.error.message,
});
return;
}

actions.resetForm({ email: '' });
actions.setStatus({
success: localize(
'_t_Please check your email and click on the link provided to reset your password._t_',
),
});
})
.catch((error) => {
if (error.msg_type === 'verify_email') {
const errorString = error.error.message.split(':');
setApiError(errorString[0]);
}
});
};

const resetValidation = (values: EmailType) => {
const errors: ErrorType = {};
const email = trimSpaces(values.email);
const email_error = validation.required(email) || validation.email(email);
setApiError('');
if (email_error) {
errors.email = email_error;
}

return errors;
};
const [apiError, setApiError] = useState<string | null>('')
const initialValues: EmailType = { email: '' }

Expand Down
Loading