mirror of
https://github.com/karl0ss/homepage.git
synced 2025-05-03 14:03:40 +01:00
CI: filter ci by paths, docs ci test vs build, update PR template
This commit is contained in:
parent
56f46ae85c
commit
a1e023e240
5
.github/PULL_REQUEST_TEMPLATE.md
vendored
5
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -6,7 +6,7 @@ Please include a summary of the change. Screenshots and / or videos can also be
|
|||||||
*** Please see the development guidelines for new widgets: https://gethomepage.dev/en/more/development/#service-widget-guidelines
|
*** Please see the development guidelines for new widgets: https://gethomepage.dev/en/more/development/#service-widget-guidelines
|
||||||
*** If you do not follow these guidelines your PR will likely be closed without review.
|
*** If you do not follow these guidelines your PR will likely be closed without review.
|
||||||
|
|
||||||
New service widgets should include example(s) of relevant relevant API output as well as a PR to the docs for the new widget.
|
New service widgets should include example(s) of relevant relevant API output as well updates to the docs for the new widget.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
Closes # (issue)
|
Closes # (issue)
|
||||||
@ -20,11 +20,12 @@ What type of change does your PR introduce to Homepage?
|
|||||||
- [ ] New service widget
|
- [ ] New service widget
|
||||||
- [ ] Bug fix (non-breaking change which fixes an issue)
|
- [ ] Bug fix (non-breaking change which fixes an issue)
|
||||||
- [ ] New feature (non-breaking change which adds functionality)
|
- [ ] New feature (non-breaking change which adds functionality)
|
||||||
|
- [ ] Documentation only
|
||||||
- [ ] Other (please explain)
|
- [ ] Other (please explain)
|
||||||
|
|
||||||
## Checklist:
|
## Checklist:
|
||||||
|
|
||||||
- [ ] If adding a service widget or a change that requires it, I have added corresponding documentation.
|
- [ ] If adding a service widget or a change that requires it, I have added corresponding documentation changes.
|
||||||
- [ ] If adding a new widget I have reviewed the [guidelines](https://gethomepage.dev/en/more/development/#service-widget-guidelines).
|
- [ ] If adding a new widget I have reviewed the [guidelines](https://gethomepage.dev/en/more/development/#service-widget-guidelines).
|
||||||
- [ ] If applicable, I have checked that all tests pass with e.g. `pnpm lint`.
|
- [ ] If applicable, I have checked that all tests pass with e.g. `pnpm lint`.
|
||||||
- [ ] If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.
|
- [ ] If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.
|
||||||
|
11
.github/workflows/docker-publish.yml
vendored
11
.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
|
||||||
@ -24,7 +30,8 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
if: github.repository == 'benphelps/homepage'
|
name: Docker Build & Push
|
||||||
|
if: github.repository == 'benphelps/homepage'
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@ -40,7 +47,7 @@ jobs:
|
|||||||
# Install the cosign tool except on PR
|
# Install the cosign tool except on PR
|
||||||
# https://github.com/sigstore/cosign-installer
|
# https://github.com/sigstore/cosign-installer
|
||||||
- name: Install cosign
|
- name: Install cosign
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
uses: sigstore/cosign-installer@main
|
uses: sigstore/cosign-installer@main
|
||||||
with:
|
with:
|
||||||
cosign-release: 'v1.13.1' # optional
|
cosign-release: 'v1.13.1' # optional
|
||||||
|
35
.github/workflows/docs-publish.yml
vendored
35
.github/workflows/docs-publish.yml
vendored
@ -4,14 +4,43 @@ on:
|
|||||||
push:
|
push:
|
||||||
tags: [ 'v*.*.*' ]
|
tags: [ 'v*.*.*' ]
|
||||||
branches: ['main']
|
branches: ['main']
|
||||||
|
paths:
|
||||||
|
- 'docs/**'
|
||||||
|
- 'mkdocs.yml'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'docs/**'
|
||||||
|
- 'mkdocs.yml'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
test:
|
||||||
|
name: Test Build
|
||||||
|
if: github.repository == 'benphelps/homepage' && github.event_name == 'pull_request'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
key: mkdocs-material-${{ env.cache_id }}
|
||||||
|
path: .cache
|
||||||
|
restore-keys: |
|
||||||
|
mkdocs-material-
|
||||||
|
- run: sudo apt-get install pngquant
|
||||||
|
- run: pip install mike
|
||||||
|
- run: pip install mkdocs-material
|
||||||
|
- name: Test Docs Build
|
||||||
|
run: MKINSIDERS=false mkdocs build
|
||||||
deploy:
|
deploy:
|
||||||
if: github.repository == 'benphelps/homepage'
|
name: Build & Deploy
|
||||||
|
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
|
||||||
@ -40,10 +69,10 @@ jobs:
|
|||||||
git checkout gh-pages
|
git checkout gh-pages
|
||||||
git pull origin gh-pages
|
git pull origin gh-pages
|
||||||
git checkout main
|
git checkout main
|
||||||
- name: Mike Deploy for Main
|
- name: Docs Deploy for Main
|
||||||
if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
run: MKINSIDERS=true mike deploy --update --push ${{github.ref_name}}
|
run: MKINSIDERS=true mike deploy --update --push ${{github.ref_name}}
|
||||||
- name: Mike Deploy for Tags
|
- name: Docs Deploy for Tags
|
||||||
if: github.ref != 'refs/heads/main'
|
if: github.ref != 'refs/heads/main'
|
||||||
run: MKINSIDERS=true mike deploy --update --push ${{github.ref_name}} latest
|
run: MKINSIDERS=true mike deploy --update --push ${{github.ref_name}} latest
|
||||||
env:
|
env:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user