Skip to content

Commit

Permalink
Merge pull request #115 from linwumingshi/ci/pr
Browse files Browse the repository at this point in the history
ci: 👷 Add dependency updates and new workflow configurations
  • Loading branch information
shalousun authored Sep 18, 2024
2 parents a223485 + 53a07a8 commit 008127a
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 2 deletions.
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
labels:
- "ci"


- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
labels:
- "dependencies"
3 changes: 1 addition & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ concurrency:
jobs:
# Build job
build:
if: ${{ github.repository == 'smart-doc-group/smart-doc-group.github.io' && github.event.pull_request.changed_files > 0 }}
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -40,8 +41,6 @@ jobs:
cache: pnpm
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.4.0
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/pr-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: PR CI

on:
pull_request:
branches:
- master


# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write


jobs:
build:
if: ${{ github.repository == 'smart-doc-group/smart-doc-group.github.io'
&& github.event.pull_request.changed_files > 0 }}
runs-on: ubuntu-latest
concurrency:
group: pr-build-${{ github.event.pull_request.number }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled
- uses: pnpm/action-setup@v4 # Uncomment this if you're using pnpm
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Install dependencies
run: pnpm install
- name: Build with VitePress
run: pnpm docs:build

0 comments on commit 008127a

Please sign in to comment.