From 20a37fdd35e73b50bdbc10a894a0fd57837a760a Mon Sep 17 00:00:00 2001 From: Justin Starry Date: Sat, 15 Aug 2020 23:49:39 +0800 Subject: [PATCH] Deploy to firebase (#1481) --- .firebaserc | 5 +++++ .github/workflows/autopublish.yml | 9 +++++---- firebase.json | 16 ++++++++++++++++ 3 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 .firebaserc create mode 100644 firebase.json diff --git a/.firebaserc b/.firebaserc new file mode 100644 index 00000000000..499866faacf --- /dev/null +++ b/.firebaserc @@ -0,0 +1,5 @@ +{ + "projects": { + "default": "yew-rs" + } +} diff --git a/.github/workflows/autopublish.yml b/.github/workflows/autopublish.yml index 43deb7e2196..7cbf6762fb7 100644 --- a/.github/workflows/autopublish.yml +++ b/.github/workflows/autopublish.yml @@ -20,8 +20,9 @@ jobs: run: cd website && yarn install && cd ../ - name: Build site run: cd website && yarn run build && cd ../ - - name: Publish website - uses: peaceiris/actions-gh-pages@v3 + - name: Deploy to Firebase + uses: w9jds/firebase-action@master with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./website/build/docs + args: deploy --only hosting --public website/build/docs + env: + FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} diff --git a/firebase.json b/firebase.json new file mode 100644 index 00000000000..db79f85229a --- /dev/null +++ b/firebase.json @@ -0,0 +1,16 @@ +{ + "hosting": { + "public": "website/build/docs", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ] + } +}