diff --git a/.github/workflows/featureRelease.yml b/.github/workflows/featureRelease.yml new file mode 100644 index 00000000..2ddfb07c --- /dev/null +++ b/.github/workflows/featureRelease.yml @@ -0,0 +1,40 @@ +name: Latest Release + +on: + push: + branches: + - 'feature/**' + paths: + - 'webapp_frontend/**' + - 'webapp_provider/**' + +jobs: + Build_Docker_Image_on_Push: + runs-on: ubuntu-latest + steps: + - + name: Set up Project + uses: actions/checkout@v2 + - + name: Set up Node.js environment + uses: actions/setup-node@v2.1.2 + with: + node-version: 12 + - + name: Build frontend + run: | + cd webapp_frontend + npm i + npm run-script build + cp -r build ../webapp_provider/public + - + name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USER }} + password: ${{ secrets.DOCKER_PW }} + - + name: Build and push + run: | + docker build -t filefighter/frontend:feature webapp_provider/ + docker push filefighter/frontend:feature \ No newline at end of file diff --git a/.github/workflows/latestRelease.yml b/.github/workflows/latestRelease.yml index 51314789..63333d83 100644 --- a/.github/workflows/latestRelease.yml +++ b/.github/workflows/latestRelease.yml @@ -1,6 +1,12 @@ name: Latest Release -on: push +on: + push: + branches: + - 'master' + paths: + - 'webapp_frontend/**' + - 'webapp_provider/**' jobs: Build_Docker_Image_on_Push: diff --git a/.github/workflows/stableRelease.yml b/.github/workflows/stableRelease.yml index 33ccfcef..56aeb2cc 100644 --- a/.github/workflows/stableRelease.yml +++ b/.github/workflows/stableRelease.yml @@ -2,8 +2,14 @@ name: Stable Release on: push: + branches: + - 'master' tags: - 'v*.*.*' + paths: + - 'webapp_frontend/**' + - 'webapp_provider/**' + jobs: Build_Docker_Image_on_new_Tag: runs-on: ubuntu-latest diff --git a/webapp_frontend/package-lock.json b/webapp_frontend/package-lock.json index 9c69aeb0..1151a832 100644 --- a/webapp_frontend/package-lock.json +++ b/webapp_frontend/package-lock.json @@ -2523,6 +2523,14 @@ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz", "integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA==" }, + "axios": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.20.0.tgz", + "integrity": "sha512-ANA4rr2BDcmmAQLOKft2fufrtuvlqR+cXNNinUmvfeSNCOF98PZL+7M/v1zIdGo7OLjEA9J2gXJL+j4zGsl0bA==", + "requires": { + "follow-redirects": "^1.10.0" + } + }, "axobject-query": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz", diff --git a/webapp_frontend/package.json b/webapp_frontend/package.json index e2c8742a..eaa7246f 100644 --- a/webapp_frontend/package.json +++ b/webapp_frontend/package.json @@ -10,6 +10,7 @@ "@types/node": "^12.12.64", "@types/react": "^16.9.51", "@types/react-dom": "^16.9.8", + "axios": "^0.20.0", "react": "^16.13.1", "react-dom": "^16.13.1", "react-scripts": "3.4.3", diff --git a/webapp_frontend/src/App.tsx b/webapp_frontend/src/App.tsx deleted file mode 100644 index edf4a0b7..00000000 --- a/webapp_frontend/src/App.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from 'react'; -import logo from './logo.svg'; -import './App.css'; - -function App() { - return ( -
- Hello World -
-
- Edit src/App.tsx
and save to reload.
-
+ Hello World +
+
+ Edit src/App.tsx
and save to reload.
+
{backendLiveTime}
+