Skip to content

Commit

Permalink
update web netlify
Browse files Browse the repository at this point in the history
  • Loading branch information
StardustDL committed Feb 4, 2024
1 parent 91ba2a5 commit 28d2eb4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,6 @@ jobs:
- name: Build
run: |
cd ./src/web && npm run build
- name: Set netlify redirects
run: |
echo -e "[[redirects]]\nfrom = \"/*\"\nto = \"/index.html\"\nstatus = 200\n" > ./src/web/dist/netlify.toml
- name: Upload results
uses: actions/upload-artifact@v4
with:
Expand All @@ -181,6 +178,9 @@ jobs:
run: |
cd docs
paperead build
- name: Add redirects
run: |
echo "* /index.html" > ./docs/dist/_redirects
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -219,14 +219,19 @@ jobs:
needs: [deploy]
runs-on: ubuntu-latest
steps:
- name: Download app artifacts
uses: actions/download-artifact@v4
with:
name: web-dist
path: ./web-dist
- name: Deploy docs to netlify
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: netlify/actions/cli@master
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_APP_SITE_ID }}
with:
args: deploy --dir=./docs/dist --prod
args: deploy --dir=./web-dist --prod
secrets: '["NETLIFY_AUTH_TOKEN", "NETLIFY_SITE_ID"]'
deploy-package:
needs: [deploy]
Expand Down
4 changes: 4 additions & 0 deletions src/web/public/netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[[redirects]]
from = "*"
to = "/index.html"
status = 200

0 comments on commit 28d2eb4

Please sign in to comment.