Skip to content

deploy_to_cf_workers #2

deploy_to_cf_workers

deploy_to_cf_workers #2

Workflow file for this run

name: Deploy Worker
on:
repository_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "latest"
cache: "npm"
- name: Install modules
run: npm i wrangler@latest
- name: Build
run: npx wrangler build
- name: Add Header
run: cp ${{ github.workspace }}/dist/worker.js ${{ github.workspace }}/dist/worker-original.js && echo -e "/*!\n * v2ray Subscription Worker (${{ github.sha }})\n * Copyright 2024 Vahid Farid (https://twitter.com/vahidfarid)\n * Licensed under GPLv3 (https://github.com/vfarid/v2ray-worker/blob/main/Licence.md)\n */\n\n$(cat ${{ github.workspace }}/dist/worker.js)" > ${{ github.workspace }}/dist/worker.js
- name: Deploy
run: sed -i s/KV_NAME/${{ secrets.KV_NAME }}/g wrangler.toml
with:

Check failure on line 31 in .github/workflows/deploy.yml

View workflow run for this annotation

GitHub Actions / Deploy Worker

Invalid workflow file

The workflow is not valid. .github/workflows/deploy.yml (Line: 31, Col: 7): Unexpected value 'with'
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}