我正在使用 vite 设置我的第一个 svelte 项目,它应该托管在 firebase 上。我做了一个部署到 firebase 的动作,效果很好。不过,我做了一个类似的 github 操作,该操作在拉取请求上生成了一个预览通道,但该通道不起作用。
这是我的代码。
name: Deploy to Preview Channel
on:
pull_request_target:
jobs:
build_and_preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- run: npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_SVELTE_WETHER_SITE }}"
expires: 10d
projectId: your-Firebase-project-ID
这是我得到的错误
Run FirebaseExtended/action-hosting-deploy@v0
/home/runner/work/_actions/FirebaseExtended/action-hosting-deploy/v0/bin/action.min.js:3759
const error = new RequestError(message, status, {
^
RequestError [HttpError]: Resource not accessible by integration
at /home/runner/work/_actions/FirebaseExtended/action-hosting-deploy/v0/bin/action.min.js:3759:31
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async createCheck (/home/runner/work/_actions/FirebaseExtended/action-hosting-deploy/v0/bin/action.min.js:5680:17)
at async run (/home/runner/work/_actions/FirebaseExtended/action-hosting-deploy/v0/bin/action.min.js:11435:14) {
status: 403,
我尝试过同时使用两者 在: 拉请求目标: 和 在: 拉请求: 当我在某处读到,否则秘密可能无法访问密钥