diff --git a/.github/workflows/deploy-install-scripts.yml b/.github/workflows/deploy-install-scripts.yml new file mode 100644 index 00000000..196d1fc4 --- /dev/null +++ b/.github/workflows/deploy-install-scripts.yml @@ -0,0 +1,28 @@ +name: Deploy Install Scripts + +on: + push: + branches: [main] + paths: + - 'openclaw/install.sh' + - 'install/**' + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Copy install scripts to deploy directory + run: | + cp openclaw/install.sh install/public/openclaw.sh + + - name: Deploy to Vercel + uses: amondnet/vercel-action@v25 + with: + vercel-token: ${{ secrets.VERCEL_TOKEN }} + vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} + vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} + vercel-args: '--prod' + working-directory: ./install diff --git a/install/.gitignore b/install/.gitignore new file mode 100644 index 00000000..e940dd69 --- /dev/null +++ b/install/.gitignore @@ -0,0 +1,2 @@ +.vercel +public/openclaw.sh diff --git a/install/vercel.json b/install/vercel.json new file mode 100644 index 00000000..d9504cd5 --- /dev/null +++ b/install/vercel.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://openapi.vercel.sh/vercel.json", + "headers": [ + { + "source": "/(.*)\\.sh", + "headers": [ + { "key": "Content-Type", "value": "text/plain; charset=utf-8" }, + { "key": "Cache-Control", "value": "public, max-age=300, s-maxage=60" } + ] + } + ] +}