Skip to content

Commit

Permalink
vercel build in workflow only
Browse files Browse the repository at this point in the history
  • Loading branch information
wakamex committed Jul 18, 2023
1 parent 3e9c3fd commit 4324fed
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/vercel-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Vercel Preview Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
push:
branches-ignore:
- main
jobs:
Deploy-Preview:
runs-on: ubuntu-latest
steps:
- name: Check GitHub rate limit at start
uses: wakamex/rate-limit-action@master
with:
token: ${{ secrets.GH_GITHUB_COM_TOKEN || github.token}}

- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_GITHUB_COM_TOKEN || github.token}}

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
token: ${{ secrets.GH_GITHUB_COM_TOKEN || github.token}}
- run: |
python -m pip install --upgrade pip
python -m pip install .[docs]
- 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 Project Artifacts to Vercel
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}

- name: Check GitHub rate limit at end
uses: wakamex/rate-limit-action@master
with:
token: ${{ secrets.GH_GITHUB_COM_TOKEN || github.token}}
5 changes: 5 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"git": {
"deploymentEnabled": false
}
}

0 comments on commit 4324fed

Please sign in to comment.