Skip to content

Commit

Permalink
Fix Layout import and update deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Rub21 committed Nov 6, 2024
1 parent c681bf8 commit c1c492f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 32 deletions.
53 changes: 23 additions & 30 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,19 @@ name: Build and Publish Arena Site
on:
push:
branches:
- 'main'
- 'deploy'
- "main"
- "deploy"

jobs:
rapid:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
# - name: Cancel Previous Runs
# uses: styfle/[email protected]
# with:
# access_token: ${{ github.token }}

- name: Set environment variables
# if: github.ref == 'refs/heads/deploy'
uses: allenevans/[email protected]
with:
ARENA_S3_BUCKET: ${{ secrets.ARENA_S3_BUCKET }}
Expand All @@ -27,41 +26,35 @@ jobs:

- name: Checkout current repository
uses: actions/checkout@v2
with:
path: web_app

- name: Use Node.js 18
uses: actions/setup-node@v1
with:
node-version: 18

- name: Cache node modules
id: cache-node-modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: web_app/node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('web_app/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Yarn
run: |
npm install -g yarn
- name: Install dependencies
run: |
cd web_app && yarn install
- name: Install modules
if: steps.cache-node-modules.outputs.cache-hit != 'true'
- name: Configure path alias
run: |
cd web_app
npm install
echo '{ "compilerOptions": { "baseUrl": ".", "paths": { "@/*": ["src/*"] } } }' > web_app/jsconfig.json
- name: Build rapid frontend
run: |
cd web_app
npm run build
cd web_app && yarn build
# - name: Install sharp (optional for image optimization)
# run: |
# cd web_app && yarn add sharp

- uses: actions/setup-python@v2
with:
python-version: '3.8'
python-version: "3.8"

- name: Install aws cli
run: |
Expand All @@ -75,4 +68,4 @@ jobs:
aws cloudfront create-invalidation --distribution-id=${{ env.CLOUDFRONT_DISTRIBUTION_ID }} --paths=/
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
3 changes: 2 additions & 1 deletion web_app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ next-env.d.ts

# yarn

.idea/
.idea/
.env
2 changes: 1 addition & 1 deletion web_app/src/pages/_app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'mapbox-gl/dist/mapbox-gl.css';

import { ChakraProvider } from '@chakra-ui/react';
import theme from '@/config/theme';
import Layout from '@/components/Layout';
import Layout from '@/components/layout';
import { AppWrapper } from '@/store/context';
import Head from 'next/head';
import {
Expand Down

0 comments on commit c1c492f

Please sign in to comment.