Skip to content

Commit 72be949

Browse files
authored
Merge pull request #412 from owasp-noir/improve-ci-cd-workflows
Refactor GitHub Actions workflow to include additional paths for CI, Jekyll
2 parents 2eeefd2 + e1a1266 commit 72be949

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

.github/workflows/ci.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ name: CI
33
on:
44
pull_request_target:
55
branches: [main, dev]
6-
paths:
7-
- '**/*.cr'
8-
- '**/*.yml'
9-
6+
paths: ['**/*.cr', shard.yml, Dockerfile]
107
jobs:
118
build-crystal:
129
runs-on: ubuntu-latest

.github/workflows/jekyll.yml

+11-12
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,30 @@
1+
---
12
# This workflow uses actions that are not certified by GitHub.
23
# They are provided by a third-party and are governed by
34
# separate terms of service, privacy policy, and support
45
# documentation.
56

67
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
78
name: Deploy Jekyll site to Pages
8-
99
on:
1010
# Runs on pushes targeting the default branch
1111
push:
12-
branches: ["dev"]
12+
branches: [dev]
13+
paths:
14+
- docs/**/*
1315

1416
# Allows you to run this workflow manually from the Actions tab
1517
workflow_dispatch:
16-
1718
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1819
permissions:
1920
contents: read
2021
pages: write
2122
id-token: write
22-
2323
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
2424
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2525
concurrency:
26-
group: "pages"
26+
group: pages
2727
cancel-in-progress: false
28-
2928
jobs:
3029
# Build job
3130
build:
@@ -34,12 +33,12 @@ jobs:
3433
- name: Checkout
3534
uses: actions/checkout@v4
3635
- name: Setup Ruby
37-
uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0
36+
uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0
3837
with:
39-
ruby-version: '3.2' # Not needed with a .ruby-version file
40-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
41-
cache-version: 0 # Increment this number if you need to re-download cached gems
42-
working-directory: docs # Needed if your Gemfile is not in the root directory
38+
ruby-version: '3.2' # Not needed with a .ruby-version file
39+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
40+
cache-version: 0 # Increment this number if you need to re-download cached gems
41+
working-directory: docs # Needed if your Gemfile is not in the root directory
4342
- name: Setup Pages
4443
id: pages
4544
uses: actions/configure-pages@v4
@@ -65,4 +64,4 @@ jobs:
6564
steps:
6665
- name: Deploy to GitHub Pages
6766
id: deployment
68-
uses: actions/deploy-pages@v4
67+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)