From 90640635292490988a3b01e99e90d22c164a633d Mon Sep 17 00:00:00 2001 From: Rok Garbas Date: Sat, 9 May 2020 00:44:52 +0200 Subject: [PATCH] a single page app and want history pushstate to work so you get clean URLs (#9) --- .github/workflows/main.yml | 4 +++- netlify.toml | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 netlify.toml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e4c34d0..e67dd4c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,9 @@ jobs: - name: Installing Nix uses: cachix/install-nix-action@v8 - name: Building search.nixos.org - run: nix-shell --run "yarn prod" + run: | + nix-shell --run "yarn prod" + cp netlify.toml ./dist/ - name: Deploy to Netlify uses: nwtgck/actions-netlify@v1.0.5 env: diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000..b87b8d3 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,4 @@ +[[redirects]] + from = "/*" + to = "/index.html" + status = 200