-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c1adac8
commit 5d6e409
Showing
3 changed files
with
37 additions
and
13 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 |
---|---|---|
@@ -1,30 +1,34 @@ | ||
name: Lint & Format | ||
name: Frontend Linter | ||
|
||
# TODO frontend | ||
on: | ||
push: | ||
paths: | ||
- 'frontend/**' | ||
branches: | ||
- master | ||
- staging | ||
- main | ||
- add_frontend_dockerfile | ||
pull_request: | ||
paths: | ||
- 'frontend/**' | ||
branches: | ||
- staging | ||
- master | ||
- '*' | ||
|
||
jobs: | ||
lint-format: | ||
name: lint-format | ||
frontend-lint: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
- name: Setup Node Environment | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
node-version: 18 | ||
- name: Install Dependencies | ||
run: npm ci | ||
- name: Check File Format | ||
run: npm run check-format | ||
working-directory: frontend | ||
env: | ||
FA_PRO_KEY: ${{ secrets.FA_PRO_KEY }} | ||
run: npm --userconfig=".npmrc_ci" ci | ||
- name: Lint Files | ||
run: npm run check-style | ||
working-directory: frontend | ||
run: npm run lint |
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 @@ | ||
//npm.fontawesome.com/:_authToken=${FA_PRO_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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM node:18-alpine AS build | ||
|
||
RUN mkdir -p /usr/src/nuxt-app | ||
WORKDIR /usr/src/nuxt-app | ||
COPY . . | ||
|
||
RUN echo "//npm.fontawesome.com/:_authToken=${FA_PRO_KEY}" > .npmrc && npm ci && npm cache clean --force && rm -f .npmrc | ||
RUN npm run build | ||
|
||
FROM node:18-alpine | ||
WORKDIR /usr/src/nuxt-app | ||
COPY --from=build /usr/src/nuxt-app /usr/src/nuxt-app | ||
|
||
ENV NUXT_HOST=0.0.0.0 | ||
ENV NUXT_PORT=3000 | ||
|
||
EXPOSE 3000 | ||
|
||
ENTRYPOINT ["node", ".output/server/index.mjs"] |