From d5afa6de9445ffe0d8b959db1798bd6376acb665 Mon Sep 17 00:00:00 2001 From: "Mountain/\\Ash" Date: Wed, 6 Mar 2024 19:05:54 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Build=20static=20site=20output?= =?UTF-8?q?=20in=20the=20Workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/debug-action.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/debug-action.yml b/.github/workflows/debug-action.yml index cfd76378..c2e8bf0d 100644 --- a/.github/workflows/debug-action.yml +++ b/.github/workflows/debug-action.yml @@ -40,21 +40,31 @@ jobs: - name: Pull Vercel environment information 🔑 run: npx vercel pull --yes --token=${{ secrets.VERCEL_TOKEN }} - - name: Build website 🏗 + - name: Make sample website 📄 env: LOCAL_REF: ${{ github.event.inputs.ref }} - run: touch index.html && echo "LOCAL_REF=$LOCAL_REF" >> index.html + BUILD_DIR: .vercel/output/static + run: mkdir -p $BUILD_DIR/ && touch $BUILD_DIR/index.html && echo "LOCAL_REF=$LOCAL_REF" > $BUILD_DIR/index.html + + - name: Make sample config 📄 + env: + CONFIG_DIR: .vercel/output + + - name: Create config.json 📄 + run: | + touch $CONFIG_DIR/config.json + echo "{\"version\": 3}" > $CONFIG_DIR/config.json - name: Deploy to Vercel 🚀 id: verceldeploy # Fork of https://github.com/BetaHuhn/deploy-to-vercel-action uses: mountainash/fork-deploy-to-vercel-action@924ce29dfa0ee1980ef938dfee6c853fe7e5732d with: - GITHUB_REPOSITORY: ${{ github.repository }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} + PREBUILT: true - name: Deploy to Vercel outputs ✍️ run: |