From 0d37b38dc910e5f65d40f844e10135e6230a7f97 Mon Sep 17 00:00:00 2001 From: Jacques Maarek Date: Wed, 6 Oct 2021 13:13:51 +0200 Subject: [PATCH 1/5] Fix: added redirect file for react router. --- front/netlify.toml | 3 ++- front/public/_redirects | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 front/public/_redirects diff --git a/front/netlify.toml b/front/netlify.toml index cf189f3..4024408 100644 --- a/front/netlify.toml +++ b/front/netlify.toml @@ -1,4 +1,5 @@ [build] base="/front" publish="/build" -command="npm install && yarn start" \ No newline at end of file +command="yarn build && yarn start" + diff --git a/front/public/_redirects b/front/public/_redirects new file mode 100644 index 0000000..f824337 --- /dev/null +++ b/front/public/_redirects @@ -0,0 +1 @@ +/* /index.html 200 \ No newline at end of file From 2304aa94a547e270af2a462dfe16ecfb4e02b95e Mon Sep 17 00:00:00 2001 From: Jacques Maarek Date: Wed, 6 Oct 2021 13:23:24 +0200 Subject: [PATCH 2/5] Fix: test pipeline. --- front/public/_redirects | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/public/_redirects b/front/public/_redirects index f824337..7797f7c 100644 --- a/front/public/_redirects +++ b/front/public/_redirects @@ -1 +1 @@ -/* /index.html 200 \ No newline at end of file +/* /index.html 200 From db9a531325e427ff061487b18280c82c410ff9dc Mon Sep 17 00:00:00 2001 From: Jacques Maarek Date: Wed, 6 Oct 2021 13:25:55 +0200 Subject: [PATCH 3/5] Fix: updated preview workflow. --- .github/workflows/netlify-preview.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/netlify-preview.yml b/.github/workflows/netlify-preview.yml index 4081a14..d10d353 100644 --- a/.github/workflows/netlify-preview.yml +++ b/.github/workflows/netlify-preview.yml @@ -6,6 +6,11 @@ on: - develop paths: - 'front/**' + pull_request: + branches: + - develop + paths: + - 'front/**' workflow_run: workflows: [ "Lint, Build & Tests - NodeJs" ] types: From 775985bc8e561a256a31cdaf574d5c6ecff8e126 Mon Sep 17 00:00:00 2001 From: Jacques Maarek Date: Wed, 6 Oct 2021 13:37:27 +0200 Subject: [PATCH 4/5] Fix: oops. --- .github/workflows/netlify-preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/netlify-preview.yml b/.github/workflows/netlify-preview.yml index d10d353..89f96cd 100644 --- a/.github/workflows/netlify-preview.yml +++ b/.github/workflows/netlify-preview.yml @@ -27,7 +27,7 @@ jobs: - name: Netlify prevew deploy uses: nwtgck/actions-netlify@v1.2.2 with: - publish-dir: './front/build' + publish-dir: 'front/build' production-branch: main github-token: ${{ secrets.GITHUB_TOKEN }} deploy-message: "Deploy from GitHub Actions" From 57869f81f1e24d7d764c63e428068bba0c308dbe Mon Sep 17 00:00:00 2001 From: Jacques Maarek Date: Wed, 6 Oct 2021 13:42:14 +0200 Subject: [PATCH 5/5] Fix: oops. --- front/netlify.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/front/netlify.toml b/front/netlify.toml index 4024408..e05532e 100644 --- a/front/netlify.toml +++ b/front/netlify.toml @@ -1,5 +1,4 @@ [build] -base="/front" publish="/build" command="yarn build && yarn start"