mirror of
https://github.com/tuono-labs/tuono
synced 2026-07-25 12:52:47 -07:00
ci: trigger workflow only on push only on main (#166)
This commit is contained in:
committed by
GitHub
parent
4c3e90ea4b
commit
7f50f31837
@@ -2,6 +2,8 @@ name: Documentation Website CI
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
paths:
|
paths:
|
||||||
- '.github/**'
|
- '.github/**'
|
||||||
- 'apps/documentation/**'
|
- 'apps/documentation/**'
|
||||||
@@ -12,10 +14,9 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
|
|
||||||
name: Check build
|
name: Check build
|
||||||
timeout-minutes: 15
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 15
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
@@ -34,9 +35,8 @@ jobs:
|
|||||||
working-directory: ./apps/documentation
|
working-directory: ./apps/documentation
|
||||||
run: tuono build --static
|
run: tuono build --static
|
||||||
|
|
||||||
fmt-lint-and-types:
|
code_check:
|
||||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
|
name: Check format, lint and types
|
||||||
name: Check format and lint
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
name: Deploy documentation website on AWS S3
|
name: Deploy documentation website on AWS S3
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
@@ -9,6 +10,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy-documentation:
|
deploy-documentation:
|
||||||
|
name: Deploy
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
name: Publish on npm and crates
|
name: Publish on npm and crates
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [published]
|
types: [published]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish-on-npm-dry-run:
|
publish_npm_dry_run:
|
||||||
|
name: NPM publish (dry run)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -23,8 +26,10 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
publish-on-crates-dry-run:
|
publish_crates_dry_run:
|
||||||
|
name: Crates publish (dry run)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -41,9 +46,11 @@ jobs:
|
|||||||
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||||
check-repo: true
|
check-repo: true
|
||||||
|
|
||||||
publish-on-npm:
|
publish_npm:
|
||||||
needs: [publish-on-crates-dry-run, publish-on-npm-dry-run]
|
name: NPM publish
|
||||||
|
needs: [publish_npm_dry_run, publish_crates_dry_run]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -64,9 +71,11 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
publish-on-crates:
|
publish_crates:
|
||||||
needs: [publish-on-crates-dry-run, publish-on-npm-dry-run]
|
name: Crates publish
|
||||||
|
needs: [publish_npm_dry_run, publish_crates_dry_run]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ name: Repo root CI
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
paths:
|
paths:
|
||||||
- '.github/**'
|
- '.github/**'
|
||||||
- './*'
|
- './*'
|
||||||
@@ -15,10 +17,9 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-test:
|
build-and-test:
|
||||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
|
|
||||||
name: Check format
|
name: Check format
|
||||||
timeout-minutes: 15
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 15
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ name: Rust CI
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
paths:
|
paths:
|
||||||
- '.github/**'
|
- '.github/**'
|
||||||
- 'crates/**'
|
- 'crates/**'
|
||||||
@@ -15,7 +17,6 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_and_test:
|
build_and_test:
|
||||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
|
|
||||||
name: Build and test rust crates
|
name: Build and test rust crates
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
@@ -41,7 +42,6 @@ jobs:
|
|||||||
- run: cargo test --verbose
|
- run: cargo test --verbose
|
||||||
|
|
||||||
lint_and_fmt:
|
lint_and_fmt:
|
||||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
|
|
||||||
name: Check format and lint rust crates
|
name: Check format and lint rust crates
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ name: Typescript CI
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
paths:
|
paths:
|
||||||
- '.github/**'
|
- '.github/**'
|
||||||
- 'packages/**'
|
- 'packages/**'
|
||||||
@@ -12,7 +14,6 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_and_test:
|
build_and_test:
|
||||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
|
|
||||||
name: Check build and test
|
name: Check build and test
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
|
|
||||||
@@ -40,7 +41,6 @@ jobs:
|
|||||||
run: pnpm test
|
run: pnpm test
|
||||||
|
|
||||||
lint_and_fmt:
|
lint_and_fmt:
|
||||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
|
|
||||||
name: Check format and lint
|
name: Check format and lint
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
|
|||||||
Reference in New Issue
Block a user