-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from swimlane/master
Merge CI/CD changes
- Loading branch information
Showing
4 changed files
with
64 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Build and Deploy | ||
permissions: | ||
contents: write # Allow write permission to GITHUB_TOKEN to commit to deploy branch. | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Bundle and ship angular to gh-pages | ||
uses: AhsanAyaz/[email protected] | ||
with: | ||
base_href: / | ||
deploy_branch: gh-pages | ||
angular_dist_build_folder: dist/turbine-status/browser | ||
github_access_token: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
/bazel-out | ||
|
||
# Node | ||
/node_modules | ||
node_modules/ | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
|
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,41 @@ | ||
# Dockerfile for Angular Application | ||
|
||
# Stage 1: Build the application | ||
FROM node:22 AS build | ||
|
||
# Set working directory | ||
WORKDIR /usr/src/app | ||
|
||
# Copy package.json and package-lock.json | ||
COPY package.json package-lock.json ./ | ||
|
||
# Install dependencies | ||
RUN npm install -g @angular/cli | ||
RUN npm install | ||
|
||
# Copy the rest of the application code | ||
COPY . . | ||
|
||
# Build the Angular application | ||
RUN npm run build | ||
|
||
# Stage 2: Serve the application | ||
FROM node:22 AS serve | ||
|
||
# Set working directory | ||
WORKDIR /usr/src/app | ||
|
||
# Install production dependencies only | ||
COPY package.json package-lock.json ./ | ||
|
||
RUN npm install -g @angular/cli | ||
RUN npm install --production | ||
|
||
# Copy built files from the build stage | ||
COPY --from=build /usr/src/app/dist /usr/src/app/dist | ||
|
||
# Expose application port | ||
EXPOSE 4000 | ||
|
||
# Start the application | ||
CMD ["npm", "run", "serve:ssr:turbine-status"] |
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 |
---|---|---|
|
@@ -103,5 +103,8 @@ | |
} | ||
} | ||
} | ||
}, | ||
"cli": { | ||
"analytics": false | ||
} | ||
} |