Skip to content

1,543rd Commit

1,543rd Commit #76

Workflow file for this run

name: CI
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker compose up --build --detach ci
- name: pnpm build
run: docker compose exec --no-TTY ci pnpm build
- name: pnpm preview
run: docker compose exec --detach --no-TTY ci pnpm preview
- name: pnpm lint
run: docker compose exec --no-TTY ci pnpm lint
- name: pnpm check
run: docker compose exec --no-TTY ci pnpm check
- name: pnpm test
run: docker compose exec --no-TTY ci pnpm test
- name: pnpm e2e
run: docker compose exec --no-TTY ci pnpm e2e
deploy:
needs: test
runs-on: ubuntu-latest
if: ${{ contains(fromJSON('["refs/heads/main", "refs/heads/release", "refs/heads/prod"]'), github.ref) }}
environment: ${{ github.ref_name }}
steps:
- name: Trigger deployment
run: curl -k ${{ secrets.DEPLOY_HOOK }}
cd:
needs: test
runs-on: ubuntu-latest
if: ${{ contains(fromJSON('["refs/heads/main", "refs/heads/release", "refs/heads/prod"]'), github.ref) }}
environment: ${{ github.ref_name }}
steps:
- name: Trigger deployment
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.PERSONAL_ACCESS_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/Shyam-Chen/Pulumi-Starter/dispatches \
-d '{ "event_type": "trigger-client-workflow", "client_payload": { "sha": "${{ github.sha }}" } }'