Skip to content

Commit

Permalink
attempt to introduce fe deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Parker committed Aug 8, 2024
1 parent 4c36943 commit 55b8981
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 5 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/genparker-build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ jobs:
echo "::set-output name=environment::production"
echo "::set-output name=branch::main"
prepare-fe:
runs-on: ubuntu-latest
needs: init
steps:
- uses: BesLogic/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: publish affected
run: npx nx affected --target=publish-fe --head=${{needs.init.outputs.branch}} --base=$BEFORE_SHA --configuration=${{needs.init.outputs.environment }} --parallel=5

prepare-be:
runs-on: ubuntu-latest
needs: init
Expand Down Expand Up @@ -58,7 +69,7 @@ jobs:
git commit -am "Updating the project's structure"
git push -f origin main:deployment/philantropy
prepare-mobile:
runs-on: ubuntu-latest
needs: init
Expand All @@ -85,10 +96,10 @@ jobs:
- name: get file
run: |
curl -o ./apps/releaf/mobile/android/app/releaf.keystore -H "Authorization: token ${RELEAF_GENPARKER_KEYS}" https://raw.githubusercontent.com/andy2great/releaf-genparker-keys/main/releaf.keystore
- name: publish affected
run: npx nx affected --target=build-mobile --head=${{needs.init.outputs.branch}} --base=$BEFORE_SHA --configuration=${{needs.init.outputs.environment}} --parallel=5

- uses: r0adkll/upload-google-play@v1
if: ${{ hashFiles('apps/releaf/mobile/android/app/build/outputs/bundle/release/app-release.aab') != '' }}
with:
Expand Down
9 changes: 9 additions & 0 deletions apps/releaf/qr-code/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM nginx:1.15

WORKDIR /interface
COPY ./ /interface/

RUN rm /etc/nginx/conf.d/*
COPY ./apps/releaf/qr-code/website.conf /etc/nginx/conf.d/website.conf

COPY --from=build-stage /interface/dist/apps/qr-code/ /usr/share/nginx/html
9 changes: 9 additions & 0 deletions apps/releaf/qr-code/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
server {
listen 80 default_server;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri /index.html;
}
}
14 changes: 13 additions & 1 deletion apps/releaf/qr-code/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,17 @@
"projectType": "application",
"sourceRoot": "apps/releaf/qr-code/src",
"// targets": "to see all targets run: nx show project qr-code --web",
"targets": {}
"targets": {
"publish-fe": {
"executor": "@nx-tools/nx-container:build",
"options": {
"push": true
},
"configurations": {
"production": {
"tags": ["ghcr.io/beslogic/releaf_qr_code:latest"]
}
}
}
}
}
5 changes: 4 additions & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@
"publish": {
"dependsOn": ["setup", "build"]
},
"publish-fe": {
"dependsOn": ["setup", "build"]
},
"setup": {
"dependsOn": ["build", "build-android", "bleh"]
"dependsOn": ["build", "build-android"]
},
"build": {
"dependsOn": ["^build", "codegen", "^codegen"],
Expand Down

0 comments on commit 55b8981

Please sign in to comment.