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" ]
|
||||
# Publish semver tags as releases.
|
||||
tags: [ 'v*.*.*' ]
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- 'mkdocs.yml'
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- 'mkdocs.yml'
|
||||
|
||||
env:
|
||||
# Use docker.io for Docker Hub if empty
|
||||
@ -23,34 +29,9 @@ env:
|
||||
|
||||
|
||||
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:
|
||||
name: Docker Build & Push
|
||||
needs: changes
|
||||
if: needs.changes.outputs.src == 'true' && github.repository == 'benphelps/homepage'
|
||||
if: github.repository == 'benphelps/homepage'
|
||||
runs-on: self-hosted
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
30
.github/workflows/docs-publish.yml
vendored
30
.github/workflows/docs-publish.yml
vendored
@ -4,35 +4,22 @@ on:
|
||||
push:
|
||||
tags: [ 'v*.*.*' ]
|
||||
branches: ['main']
|
||||
paths:
|
||||
- 'docs/**'
|
||||
- 'mkdocs.yml'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'docs/**'
|
||||
- 'mkdocs.yml'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
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:
|
||||
needs: changes
|
||||
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
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@ -52,9 +39,8 @@ jobs:
|
||||
- name: Test Docs Build
|
||||
run: MKINSIDERS=false mkdocs build
|
||||
deploy:
|
||||
needs: changes
|
||||
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
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
Loading…
Reference in New Issue
Block a user