forked from airgap-it/airgap-wallet
-
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.
- Loading branch information
1 parent
225b2cc
commit cd70071
Showing
81 changed files
with
1,647 additions
and
350 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 |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Build and Deploy | ||
|
||
on: push | ||
|
||
jobs: | ||
build_angular: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache node modules | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Node 14 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14.x | ||
|
||
- name: Prepare | ||
run: | | ||
npm ci | ||
npm run prepare-prod-build | ||
- name: Prettier | ||
run: npm run actions:prettier | ||
|
||
- name: Build | ||
run: npm run build -- --prod | ||
|
||
- name: Upload | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: angular_dist | ||
path: www | ||
|
||
deploy_github_pages: | ||
needs: build_angular | ||
if: github.ref == 'refs/heads/feat/github-actions' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache node modules | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Node 14 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14.x | ||
|
||
- name: Prepare | ||
run: npm ci | ||
|
||
- name: Deploy Github Pages | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: npm run actions:deploy |
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
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
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,38 @@ | ||
FROM node:14.5.0 as build | ||
|
||
# create app directory | ||
RUN mkdir /app | ||
WORKDIR /app | ||
|
||
# Install app dependencies, using wildcard if package-lock exists | ||
COPY package.json /app | ||
COPY package-lock.json /app | ||
|
||
# install dependencies | ||
RUN npm install | ||
|
||
# browserify coin-lib | ||
RUN npm run browserify-coinlib | ||
|
||
# Bundle app source | ||
COPY . /app | ||
|
||
# set to production | ||
RUN export NODE_ENV=production | ||
|
||
# post-install hook, to be safe if it got cached | ||
RUN node config/patch_crypto.js | ||
|
||
# build | ||
RUN npx ionic build --prod | ||
|
||
################################### | ||
|
||
FROM nginx:1-alpine | ||
|
||
COPY --from=build /app/www /usr/share/nginx/html | ||
COPY nginx.conf /etc/nginx/nginx.conf | ||
|
||
EXPOSE 80 | ||
|
||
CMD [ "nginx", "-g", "daemon off;" ] |
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,49 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: __CI_PROJECT_NAME__ | ||
namespace: __NAMESPACE__ | ||
labels: | ||
app: __CI_PROJECT_NAME__ | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: __CI_PROJECT_NAME__ | ||
replicas: 1 | ||
revisionHistoryLimit: 3 | ||
strategy: | ||
type: RollingUpdate | ||
rollingUpdate: | ||
maxUnavailable: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: __CI_PROJECT_NAME__ | ||
spec: | ||
containers: | ||
- name: __CI_PROJECT_NAME__ | ||
image: __TO_BE_REPLACED_BY_IMAGE_TAG__ | ||
imagePullPolicy: IfNotPresent | ||
envFrom: | ||
- configMapRef: | ||
name: __CI_PROJECT_NAME__-config-map | ||
- secretRef: | ||
name: __CI_PROJECT_NAME__-secret | ||
ports: | ||
- containerPort: 80 | ||
readinessProbe: | ||
httpGet: | ||
path: / | ||
port: 80 | ||
initialDelaySeconds: 60 | ||
timeoutSeconds: 5 | ||
livenessProbe: | ||
httpGet: | ||
path: / | ||
port: 80 | ||
initialDelaySeconds: 60 | ||
timeoutSeconds: 5 | ||
imagePullSecrets: | ||
- name: regsecret | ||
restartPolicy: Always | ||
status: {} |
Oops, something went wrong.