Squashed commit of the following:
commit 3b370925a2cf9043c7dbb900e1178bfa82f0ecc5
Author: shamoon <4887959+shamoon@users.noreply.github.com>
Date: Sun Oct 1 01:36:08 2023 -0700
use native path filtering for ci
This commit is contained in:
parent
0222617070
commit
3902e63999
33
.github/workflows/docker-publish.yml
vendored
33
.github/workflows/docker-publish.yml
vendored
@ -12,8 +12,14 @@ on:
|
|||||||
branches: [ "main" ]
|
branches: [ "main" ]
|
||||||
# Publish semver tags as releases.
|
# Publish semver tags as releases.
|
||||||
tags: [ 'v*.*.*' ]
|
tags: [ 'v*.*.*' ]
|
||||||
|
paths-ignore:
|
||||||
|
- 'docs/**'
|
||||||
|
- 'mkdocs.yml'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "main" ]
|
branches: [ "main" ]
|
||||||
|
paths-ignore:
|
||||||
|
- 'docs/**'
|
||||||
|
- 'mkdocs.yml'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# Use docker.io for Docker Hub if empty
|
# Use docker.io for Docker Hub if empty
|
||||||
@ -23,34 +29,9 @@ env:
|
|||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
changes:
|
|
||||||
name: Detect Changes
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
# Required permissions
|
|
||||||
permissions:
|
|
||||||
pull-requests: read
|
|
||||||
# Set job outputs to values from filter step
|
|
||||||
outputs:
|
|
||||||
src: ${{ steps.filter.outputs.src }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: dorny/paths-filter@v2
|
|
||||||
id: filter
|
|
||||||
with:
|
|
||||||
filters: |
|
|
||||||
src:
|
|
||||||
- 'src/**'
|
|
||||||
- 'Dockerfile'
|
|
||||||
- 'docker-entrypoint.sh'
|
|
||||||
- 'package.json'
|
|
||||||
- 'package-lock.json'
|
|
||||||
- 'pnpm-lock.yaml'
|
|
||||||
- 'tailwind.config.js'
|
|
||||||
- 'postcss.config.js'
|
|
||||||
build:
|
build:
|
||||||
name: Docker Build & Push
|
name: Docker Build & Push
|
||||||
needs: changes
|
if: github.repository == 'benphelps/homepage'
|
||||||
if: needs.changes.outputs.src == 'true' && github.repository == 'benphelps/homepage'
|
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|||||||
30
.github/workflows/docs-publish.yml
vendored
30
.github/workflows/docs-publish.yml
vendored
@ -4,35 +4,22 @@ on:
|
|||||||
push:
|
push:
|
||||||
tags: [ 'v*.*.*' ]
|
tags: [ 'v*.*.*' ]
|
||||||
branches: ['main']
|
branches: ['main']
|
||||||
|
paths:
|
||||||
|
- 'docs/**'
|
||||||
|
- 'mkdocs.yml'
|
||||||
pull_request:
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'docs/**'
|
||||||
|
- 'mkdocs.yml'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
changes:
|
|
||||||
name: Detect Changes
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
# Required permissions
|
|
||||||
permissions:
|
|
||||||
pull-requests: read
|
|
||||||
# Set job outputs to values from filter step
|
|
||||||
outputs:
|
|
||||||
docs: ${{ steps.filter.outputs.docs }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: dorny/paths-filter@v2
|
|
||||||
id: filter
|
|
||||||
with:
|
|
||||||
filters: |
|
|
||||||
docs:
|
|
||||||
- 'docs/**'
|
|
||||||
- 'mkdocs.yml'
|
|
||||||
test:
|
test:
|
||||||
needs: changes
|
|
||||||
name: Test Build
|
name: Test Build
|
||||||
if: needs.changes.outputs.docs == 'true' && github.repository == 'benphelps/homepage' && github.event_name == 'pull_request'
|
if: github.repository == 'benphelps/homepage' && github.event_name == 'pull_request'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@ -52,9 +39,8 @@ jobs:
|
|||||||
- name: Test Docs Build
|
- name: Test Docs Build
|
||||||
run: MKINSIDERS=false mkdocs build
|
run: MKINSIDERS=false mkdocs build
|
||||||
deploy:
|
deploy:
|
||||||
needs: changes
|
|
||||||
name: Build & Deploy
|
name: Build & Deploy
|
||||||
if: needs.changes.outputs.docs == 'true' && github.repository == 'benphelps/homepage' && github.event_name != 'pull_request'
|
if: github.repository == 'benphelps/homepage' && github.event_name != 'pull_request'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user