-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Layout import and update deployment
- Loading branch information
Showing
3 changed files
with
26 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 }} | ||
|
@@ -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: | | ||
|
@@ -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 }} |
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 |
---|---|---|
|
@@ -39,4 +39,5 @@ next-env.d.ts | |
|
||
# yarn | ||
|
||
.idea/ | ||
.idea/ | ||
.env |
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