Skip to content

start python faster (#32) #95

start python faster (#32)

start python faster (#32) #95

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- '**'
pull_request: {}
env:
COLUMNS: 150
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm install
- uses: pre-commit/[email protected]
with:
extra_args: --all-files --verbose
env:
SKIP: no-commit-to-branch
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm install
- uses: cloudflare/wrangler-action@v3
name: Test deploy
with:
command: deploy --dry-run
check:
if: always()
needs: [lint, build]
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
deploy-preview:
if: "success() && github.ref != 'refs/heads/main'"
runs-on: ubuntu-latest
needs: [check]
environment:
name: deploy-preview
url: ${{ steps.get_preview_url.outputs.preview_url }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm install
- uses: cloudflare/wrangler-action@v3
name: Deploy pydantic-run-preview
id: deploy
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
environment: previews
command: deploy --var GITHUB_SHA:${{ github.sha }}
- name: get preview URL
id: get_preview_url
run: python .github/get_preview_url.py >> $GITHUB_OUTPUT
env:
DEPLOY_OUTPUT: ${{ steps.deploy.outputs.command-output }}
deploy:
if: "success() && github.ref == 'refs/heads/main'"
runs-on: ubuntu-latest
needs: [check]
environment:
name: deploy-prod
url: https://pydantic.run
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm install
- uses: cloudflare/wrangler-action@v3
name: Deploy pydantic-run
with:
apiToken: ${{ secrets.cloudflare_api_token }}
command: deploy --var GITHUB_SHA:${{ github.sha }}