Try to use vercel

This commit is contained in:
Maximilian Ammann 2021-12-09 15:48:33 +01:00
parent 497eef3ea4
commit 7e121603f9
3 changed files with 34 additions and 7 deletions

View File

@ -1,6 +1,6 @@
name: Rust
on: [push, pull_request]
on: [ push, pull_request ]
env:
CARGO_TERM_COLOR: always
@ -37,10 +37,13 @@ jobs:
- name: Build
run: npm run build
- name: Prepare for deployment
run: mv dist public
- name: Deploy to gh-pages 🚀
uses: JamesIves/github-pages-deploy-action@4.1.5
run: |
mv dist public
cp ../vercel.json public/
- uses: amondnet/vercel-action@v20
with:
branch: gh-pages
folder: web/public
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.ORG_ID}}
vercel-project-id: ${{ secrets.PROJECT_ID}}
working-directory: web/public
vercel-args: '--prod'

2
.gitignore vendored
View File

@ -13,3 +13,5 @@ Cargo.lock
# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb
.vercel

22
vercel.json Normal file
View File

@ -0,0 +1,22 @@
{
"version": 2,
"public": false,
"github": {
"enabled": false
},
"headers": [
{
"source": "/(.*)",
"headers": [
{
"key": "Cross-Origin-Opener-Policy",
"value": "same-origin"
},
{
"key": "Cross-Origin-Embedder-Policy",
"value": "require-corp"
}
]
}
]
}