diff --git a/.github/workflows/netlify-preview.yml b/.github/workflows/netlify-preview.yml index 4081a14..89f96cd 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: @@ -22,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" diff --git a/front/netlify.toml b/front/netlify.toml index cf189f3..e05532e 100644 --- a/front/netlify.toml +++ b/front/netlify.toml @@ -1,4 +1,4 @@ [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..7797f7c --- /dev/null +++ b/front/public/_redirects @@ -0,0 +1 @@ +/* /index.html 200