diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9acf0ff --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +name: TestSprite CI +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} +on: + pull_request: + types: [opened, synchronize, reopened] +jobs: + deploy: + runs-on: ubuntu-latest + outputs: + url: ${{ steps.deploy.outputs.url }} + steps: + - uses: actions/checkout@v4 + - name: Install Vercel CLI + run: npm install --global vercel@latest + - name: Pull Vercel Environment Information + run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} + - name: Build Project Artifacts + run: vercel build --token=${{ secrets.VERCEL_TOKEN }} + - name: Deploy to Vercel + id: deploy + run: echo "url=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})" >> $GITHUB_OUTPUT + test: + needs: deploy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: TestSprite Action + uses: TestSprite/run-action@v1 + with: + testsprite-api-key: ${{ secrets.TESTSPRITE_API_KEY }} + base_url: ${{ needs.deploy.outputs.url }} + blocking: 'true' \ No newline at end of file diff --git a/index.html b/index.html index fb20664..7750136 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@
-