Skip to content

Commit

Permalink
Merge pull request #20 from rrigato/dev
Browse files Browse the repository at this point in the history
Pipeline deploys new homepage
  • Loading branch information
rrigato authored Nov 25, 2023
2 parents 6d5a695 + c14a7f6 commit 19f05c9
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/homepage_source_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ cd dist

ls

aws s3 cp --dry-run . $AWS_S3_BUCKET_NAME \
aws s3 cp --dryrun . s3://$AWS_S3_BUCKET_NAME \
--recursive
5 changes: 3 additions & 2 deletions .github/workflows/homepage_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Updates web application
on:
push:
branches:
- dev
- master

jobs:
Expand All @@ -26,7 +27,7 @@ jobs:
- run: npm run build

- name: script-execution-permissions
run: chmod +x '.github/scripts/homepage_source_files.sh'
run: chmod +x '../.github/scripts/homepage_source_files.sh'

- name: upload-webpack-artifacts
shell: bash
Expand All @@ -35,7 +36,7 @@ jobs:
AWS_DEFAULT_REGION: 'us-east-1'
AWS_S3_BUCKET_NAME: 'ryanrigato.com'
AWS_SECRET_ACCESS_KEY: ${{secrets.PERSISTANT_STORAGE_KEY}}
run: '.github/scripts/homepage_source_files.sh'
run: '../.github/scripts/homepage_source_files.sh'



Expand Down
19 changes: 19 additions & 0 deletions static/js/BookRecommendations.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react';
import '../css/homepageSection.css';

/**Book Recommendations
*
* @returns react jsx
*/
export function BookRecommendations(){
return(
<div className='homepage-content'>
<div>
<ul>
<h3>Everyday Reads</h3>
<h3>Software Engineering</h3>
</ul>
</div>
</div>
);
}
6 changes: 3 additions & 3 deletions static/tests/BookRecommendations.test.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { render } from '@testing-library/react';
// import { BookRecommendations } from '../js/BookRecommendations.jsx';
import { BookRecommendations } from '../js/BookRecommendations.jsx';


describe('BookRecommendations displayed on screen', () => {
afterEach(() => {
jest.resetAllMocks();
});

test.skip('BookRecommendations section', async () => {
test('BookRecommendations section', async () => {


const {getAllByRole, getByRole} = render(<BookRecommendations/>);
Expand All @@ -16,6 +16,6 @@ describe('BookRecommendations displayed on screen', () => {
const numHeaders = getAllByRole(
'heading'
);
expect(numHeaders.length).toBe(1);
expect(numHeaders.length).toBe(2);
});
});
2 changes: 1 addition & 1 deletion static/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
test: /\.jpg$/i,
type: 'asset/resource',
generator: {
filename: 'img/[name][ext]',
filename: '[name][ext]',
},
},
{
Expand Down

0 comments on commit 19f05c9

Please sign in to comment.