Skip to content

Commit

Permalink
Merge pull request #228 from IT-Academy-BCN/workflow
Browse files Browse the repository at this point in the history
TEst deploy
  • Loading branch information
jonatanvicente authored Feb 27, 2024
2 parents 9c3124c + d904578 commit ca0282f
Show file tree
Hide file tree
Showing 188 changed files with 41 additions and 8 deletions.
41 changes: 37 additions & 4 deletions .github/workflows/deploy.dev.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Upload Image to Docker Hub
name: Upload Image to Docker Hub & Deploy to Dev

on:
push:
pull_request:
types:
- closed
branches:
- workflow
- develop

jobs:
#sonarcloud:
Expand All @@ -26,6 +28,7 @@ jobs:

docker:
#needs: sonarcloud
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
-
Expand All @@ -39,9 +42,23 @@ jobs:
do
key=$(echo $key | tr '.' '_')
echo "$key=$value" >> $GITHUB_ENV
echo "$key=$value"
done < conf/.env.CI.dev
echo "Done"
- name: Setup git-crypt
run: |
sudo apt-get update
sudo apt-get install -y git-crypt
- name: Decrypt secrets
env:
GIT_CRYPT_KEY: ${{ secrets.GIT_CRYPT_KEY }}
run: |
echo "$GIT_CRYPT_KEY" | base64 --decode > git_crypt.key
git-crypt unlock git_crypt.key
rm git_crypt.key
- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -82,10 +99,26 @@ jobs:
tags: itacademybcn/itachallenges:itachallenge-nginx-${{ env.MICROSERVICE_VERSION }}

deploy:
if: github.event.pull_request.merged == true
needs: docker
runs-on: ubuntu-latest
steps:
- name: Execute SSH
-
name: Checkout code
uses: actions/checkout@v4
-
name: Load env from file
run: |
echo "Loading env vars from .env file"
while IFS='=' read -r key value
do
key=$(echo $key | tr '.' '_')
echo "$key=$value" >> $GITHUB_ENV
echo "$key=$value"
done < conf/.env.CI.dev
echo "Done"
-
name: Execute SSH
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST_URL }}
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM nginx:stable-alpine
COPY nginx_conf/nginx.conf /etc/nginx/nginx.conf
COPY ["nginx_conf/nginx.conf", "/etc/nginx/nginx.conf"]
ADD ["dist/ita-challenges-frontend/*", "/usr/share/nginx/html/"]

EXPOSE 80
Expand Down
Empty file modified GUIDELINES_CA.md
100644 → 100755
Empty file.
Empty file modified GUIDELINES_EN.md
100644 → 100755
Empty file.
Empty file modified GUIDELINES_ES.md
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified angular.json
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion conf/.env.CI.dev
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
MICROSERVICE_DEPLOY=ita-challenges-frontend
MICROSERVICE_VERSION=2.0.2-RELEASE
MICROSERVICE_VERSION=2.0.42-RELEASE
Binary file removed conf/.env.dev
Binary file not shown.
Empty file modified contributors.md
100644 → 100755
Empty file.
Empty file modified jest.config.js
100644 → 100755
Empty file.
Empty file modified jest.config.pact.js
100644 → 100755
Empty file.
Binary file modified nginx_conf/nginx.conf
100644 → 100755
Binary file not shown.
Empty file modified nginx_conf/nginx.conf.default
100644 → 100755
Empty file.
Empty file modified package-lock.json
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion package.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ita-challenges-frontend",
"version": "2.0.2-RELEASE",
"version": "2.0.42-RELEASE",
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config proxy.conf.dev.json",
Expand Down
Empty file modified proxy.conf.dev.json
100644 → 100755
Empty file.
Empty file modified setup-jest.ts
100644 → 100755
Empty file.
Empty file modified sonar-project.properties
100644 → 100755
Empty file.
Empty file modified src/app/app-routing.module.ts
100644 → 100755
Empty file.
Empty file modified src/app/app.component.html
100644 → 100755
Empty file.
Empty file modified src/app/app.component.ts
100644 → 100755
Empty file.
Empty file modified src/app/app.module.ts
100644 → 100755
Empty file.
Empty file modified src/app/core/core-routing.module.ts
100644 → 100755
Empty file.
Empty file modified src/app/core/core.module.ts
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion src/app/core/layout/footer/footer.component.html
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<p class="version d-flex justify-content-end p-3"> v {{ currentApplicationVersion }}</p>
<p class="version d-flex justify-content-end p-3">{{ currentApplicationVersion }}</p>
Empty file modified src/app/core/layout/footer/footer.component.scss
100644 → 100755
Empty file.
Empty file modified src/app/core/layout/footer/footer.component.spec.ts
100644 → 100755
Empty file.
Empty file modified src/app/core/layout/footer/footer.component.ts
100644 → 100755
Empty file.
Empty file modified src/app/core/layout/header/header.component.html
100644 → 100755
Empty file.
Empty file modified src/app/core/layout/header/header.component.scss
100644 → 100755
Empty file.
Empty file modified src/app/core/layout/header/header.component.spec.ts
100644 → 100755
Empty file.
Empty file modified src/app/core/layout/header/header.component.ts
100644 → 100755
Empty file.
Empty file modified src/app/core/layout/header/mobile-nav/mobile-nav.component.html
100644 → 100755
Empty file.
Empty file modified src/app/core/layout/header/mobile-nav/mobile-nav.component.scss
100644 → 100755
Empty file.
Empty file.
Empty file modified src/app/core/layout/header/mobile-nav/mobile-nav.component.ts
100644 → 100755
Empty file.
Empty file modified src/app/core/layout/main-menu/main-menu.component.html
100644 → 100755
Empty file.
Empty file modified src/app/core/layout/main-menu/main-menu.component.scss
100644 → 100755
Empty file.
Empty file modified src/app/core/layout/main-menu/main-menu.component.spec.ts
100644 → 100755
Empty file.
Empty file modified src/app/core/layout/main-menu/main-menu.component.ts
100644 → 100755
Empty file.
Empty file modified src/app/core/layout/main/main.component.html
100644 → 100755
Empty file.
Empty file modified src/app/core/layout/main/main.component.scss
100644 → 100755
Empty file.
Empty file modified src/app/core/layout/main/main.component.spec.ts
100644 → 100755
Empty file.
Empty file modified src/app/core/layout/main/main.component.ts
100644 → 100755
Empty file.
Empty file modified src/app/interceptors/jwt-interceptor.ts
100644 → 100755
Empty file.
Empty file modified src/app/models/breadcrumb.ts
100644 → 100755
Empty file.
Empty file modified src/app/models/challenge-details.model.ts
100644 → 100755
Empty file.
Empty file modified src/app/models/challenge-example.model.ts
100644 → 100755
Empty file.
Empty file modified src/app/models/challenge.model.ts
100644 → 100755
Empty file.
Empty file modified src/app/models/data-challenge.model.ts
100644 → 100755
Empty file.
Empty file modified src/app/models/filter-challenge.model.ts
100644 → 100755
Empty file.
Empty file modified src/app/models/language.model.ts
100644 → 100755
Empty file.
Empty file modified src/app/models/resource.model.ts
100644 → 100755
Empty file.
Empty file modified src/app/models/solution.model.ts
100644 → 100755
Empty file.
Empty file modified src/app/models/user.model.ts
100644 → 100755
Empty file.
Empty file modified src/app/modules/challenge/challenge-routing.module.ts
100644 → 100755
Empty file.
Empty file modified src/app/modules/challenge/challenge.module.ts
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified src/app/modules/modals/filters-modal/filters-modal.component.ts
100644 → 100755
Empty file.
Empty file modified src/app/modules/modals/login-modal/login-modal.component.html
100644 → 100755
Empty file.
Empty file modified src/app/modules/modals/login-modal/login-modal.component.scss
100644 → 100755
Empty file.
Empty file.
Empty file modified src/app/modules/modals/login-modal/login-modal.component.ts
100644 → 100755
Empty file.
Empty file modified src/app/modules/modals/modals.module.ts
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified src/app/modules/profile/components/profile/profile.component.ts
100644 → 100755
Empty file.
Empty file modified src/app/modules/profile/profile-routing.module.ts
100644 → 100755
Empty file.
Empty file modified src/app/modules/profile/profile.module.ts
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified src/app/modules/starter/components/starter/starter.component.ts
100644 → 100755
Empty file.
Empty file modified src/app/modules/starter/starter-routing.module.ts
100644 → 100755
Empty file.
Empty file modified src/app/modules/starter/starter.module.ts
100644 → 100755
Empty file.
Empty file modified src/app/services/auth.service.spec.ts
100644 → 100755
Empty file.
Empty file modified src/app/services/auth.service.ts
100644 → 100755
Empty file.
Empty file modified src/app/services/breadcrumb.service.spec.ts
100644 → 100755
Empty file.
Empty file modified src/app/services/breadcrumb.service.ts
100644 → 100755
Empty file.
Empty file modified src/app/services/challenge.service.spec.ts
100644 → 100755
Empty file.
Empty file modified src/app/services/challenge.service.ts
100644 → 100755
Empty file.
Empty file modified src/app/services/solution.service.spec.ts
100644 → 100755
Empty file.
Empty file modified src/app/services/solution.service.ts
100644 → 100755
Empty file.
Empty file modified src/app/services/starter.service.spec.ts
100644 → 100755
Empty file.
Empty file modified src/app/services/starter.service.ts
100644 → 100755
Empty file.
Empty file modified src/app/shared/components/breadcrumb/breadcrumb.component.html
100644 → 100755
Empty file.
Empty file modified src/app/shared/components/breadcrumb/breadcrumb.component.scss
100644 → 100755
Empty file.
Empty file.
Empty file modified src/app/shared/components/breadcrumb/breadcrumb.component.ts
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified src/app/shared/components/pagination/pagination.component.html
100644 → 100755
Empty file.
Empty file modified src/app/shared/components/pagination/pagination.component.scss
100644 → 100755
Empty file.
Empty file.
Empty file modified src/app/shared/components/pagination/pagination.component.ts
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified src/app/shared/components/shared-components.module.ts
100644 → 100755
Empty file.
Empty file modified src/app/shared/components/solution/solution.component.html
100644 → 100755
Empty file.
Empty file modified src/app/shared/components/solution/solution.component.scss
100644 → 100755
Empty file.
Empty file modified src/app/shared/components/solution/solution.component.spec.ts
100644 → 100755
Empty file.
Empty file modified src/app/shared/components/solution/solution.component.ts
100644 → 100755
Empty file.
Empty file modified src/assets/.gitkeep
100644 → 100755
Empty file.
Empty file modified src/assets/dummy/challenge.json
100644 → 100755
Empty file.
Empty file modified src/assets/dummy/data-challenge.json
100644 → 100755
Empty file.
Empty file modified src/assets/dummy/data-typings.d.ts
100644 → 100755
Empty file.
Empty file modified src/assets/dummy/user-login.json
100644 → 100755
Empty file.
Empty file modified src/assets/dummy/user-register.json
100644 → 100755
Empty file.
Empty file modified src/assets/i18n/cat.json
100644 → 100755
Empty file.
Empty file modified src/assets/i18n/en.json
100644 → 100755
Empty file.
Empty file modified src/assets/i18n/es.json
100644 → 100755
Empty file.
Empty file modified src/assets/i18n/i18n.module.ts
100644 → 100755
Empty file.
Empty file modified src/assets/img/favicon.ico
100644 → 100755
Empty file.
Empty file modified src/assets/img/icon/arrow_left.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/assets/img/icon/arrow_right.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/assets/img/icon/badge.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/assets/img/icon/bullseye-pointer.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/assets/img/icon/chart-pie-slice.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/assets/img/icon/folder-upload.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/assets/img/icon/hamburguer-white.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/assets/img/icon/language_icon_Java.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/assets/img/icon/language_icon_Javascript.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/assets/img/icon/language_icon_PHP.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/assets/img/icon/language_icon_Python.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/assets/img/icon/lock-color.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/assets/img/icon/lock.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/assets/img/icon/megaphone.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/assets/img/icon/setting.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/assets/img/icon/sort-selected.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/assets/img/icon/sort.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/assets/img/icon/tick-pink.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/assets/img/icon/user.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/assets/img/logo.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/assets/img/users/user-1.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified src/assets/postman/ITA-Challenges.postman_collection.json
100644 → 100755
Empty file.
Empty file modified src/environments/environment.prod.ts
100644 → 100755
Empty file.
Empty file modified src/environments/environment.ts
100644 → 100755
Empty file.
Empty file modified src/index.html
100644 → 100755
Empty file.
Empty file modified src/main.ts
100644 → 100755
Empty file.
Empty file modified src/styles.scss
100644 → 100755
Empty file.
Empty file modified src/styles/_buttons.scss
100644 → 100755
Empty file.
Empty file modified src/styles/_colors.scss
100644 → 100755
Empty file.
Empty file modified src/styles/_fonts.scss
100644 → 100755
Empty file.
Empty file modified src/styles/_forms.scss
100644 → 100755
Empty file.
Empty file modified src/styles/_global.scss
100644 → 100755
Empty file.
Empty file modified src/styles/_modals.scss
100644 → 100755
Empty file.
Empty file modified tsconfig.app.json
100644 → 100755
Empty file.
Empty file modified tsconfig.json
100644 → 100755
Empty file.
Empty file modified tsconfig.spec.json
100644 → 100755
Empty file.

0 comments on commit ca0282f

Please sign in to comment.