sync #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test deploy | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- '**' | |
jobs: | |
detect_changes: | |
runs-on: ubuntu-latest | |
outputs: | |
api_changed: ${{ steps.changes.outputs.api }} | |
client_changed: ${{ steps.changes.outputs.client }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# with: | |
# fetch-depth: 0 | |
- name: Detect changes in client and API paths | |
uses: dorny/paths-filter@v3 | |
id: changes | |
with: | |
base: 'test-0' | |
ref: ${{ github.ref_name}} | |
# initial-fetch-depth: 0 | |
filters: | | |
client: | |
- 'client/**' | |
- '.github/workflows/**' | |
api: | |
- 'api/**' | |
- '.github/workflows/**' | |
- name: Print detected changes | |
run: | | |
echo "Detected changes in the following paths:" | |
echo "Client changed: ${{ steps.path_filter.outputs.client }}" | |
echo "API changed: ${{ steps.path_filter.outputs.api }}" | |
echo "All changes: ${{ steps.path_filter.outputs.changes }}" | |
build_api: | |
needs: [detect_changes] | |
if: ${{ needs.detect_changes.outputs.api_changed == 'true' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Build Step | |
run: echo "Building based on detected API changes." | |
build_client: | |
needs: [detect_changes] | |
if: ${{ needs.detect_changes.outputs.client_changed == 'true' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Build Step | |
run: echo "Building based on detected CLIENT changes." |