Skip to content

Commit 444b7c8

Browse files
fix: update CI/CD workflow to include additional workflows and adjust permissions
1 parent d577ce6 commit 444b7c8

2 files changed

Lines changed: 24 additions & 22 deletions

File tree

.github/workflows/ci-cd.yml

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,17 @@ on:
1919
- '*.gitmodules'
2020
workflow_dispatch:
2121
workflow_run:
22-
workflows: ["Documentation"]
22+
workflows: ["Documentation", "pages-build-deployment"]
2323
types: [completed]
2424

2525
permissions:
26-
contents: read
26+
contents: write
27+
pull-requests: write
28+
issues: write
29+
checks: write
30+
deployments: write
31+
discussions: write
32+
actions: write
2733
packages: write
2834
id-token: write
2935
security-events: write
@@ -229,12 +235,13 @@ jobs:
229235
name: Release
230236
runs-on: ubuntu-latest
231237
needs: [build, test]
232-
if: github.ref == 'refs/heads/main' && (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' || github.event_name != 'workflow_run')
238+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
233239

234240
steps:
235241
- name: 📥 Checkout code
236242
uses: actions/checkout@v4
237243
with:
244+
fetch-depth: 0
238245
token: ${{ secrets.GITHUB_TOKEN }}
239246

240247
- name: Configure Git Author
@@ -255,25 +262,13 @@ jobs:
255262
run_install: false
256263

257264
- name: 📥 Install dependencies
258-
run: |
259-
pnpm install --frozen-lockfile
260-
env:
261-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
265+
run: pnpm install --frozen-lockfile
262266

263-
- name: 📦 Download build artifacts
264-
uses: actions/download-artifact@v4
265-
with:
266-
name: build-artifacts-${{ github.sha }}
267-
path: dist/
267+
- name: 🏗️ Build project
268+
run: pnpm run build
268269

269-
- name: 📥 Download documentation
270-
uses: dawidd6/action-download-artifact@v3
271-
with:
272-
name: documentation
273-
path: docs/
274-
workflow: docs.yml
275-
workflow_conclusion: success
276-
github_token: ${{ secrets.GITHUB_TOKEN }}
270+
- name: 📚 Generate fresh documentation
271+
run: pnpm run docs:build
277272

278273
- name: 🚀 Semantic Release
279274
env:

.npmrc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
11
# NPM Registry Configuration for Dual Publication
22
# This file configures npm to work with both NPM and GitHub Packages
3+
auto-install-peers=true
4+
shamefully-hoist=false
5+
strict-peer-dependencies=false
6+
save-exact=false
7+
prefer-workspace-packages=true
38

49
# Default registry (NPM)
510
registry=https://registry.npmjs.org/
611

712
# GitHub Packages registry for scoped packages
8-
@devalexanderdaza:registry=https://npm.pkg.github.com/
13+
# @devalexanderdaza:registry=https://npm.pkg.github.com/
914
# //npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}
1015

1116
# Optional: Configure specific scopes for GitHub Packages
1217
# @your-scope:registry=https://npm.pkg.github.com/
1318
# //npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}
19+
store-dir=~/.pnpm-store
1420

1521
# Ensure packages are published as public
16-
access=public
22+
# access=public
1723

1824
# Disable package-lock for pnpm projects (optional)
1925
package-lock=true
26+
frozen-lockfile=true

0 commit comments

Comments
 (0)