Deploy to firebase (#1481)

This commit is contained in:
Justin Starry 2020-08-15 23:49:39 +08:00 committed by GitHub
parent 84d1ad61d8
commit 20a37fdd35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 4 deletions

5
.firebaserc Normal file
View File

@ -0,0 +1,5 @@
{
"projects": {
"default": "yew-rs"
}
}

View File

@ -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 }}

16
firebase.json Normal file
View File

@ -0,0 +1,16 @@
{
"hosting": {
"public": "website/build/docs",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}