Skip to content

Commit

Permalink
chore: fix release and deploy pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
tinesoft committed Jan 10, 2024
1 parent 4fc862d commit f4481a8
Show file tree
Hide file tree
Showing 8 changed files with 1,543 additions and 2,921 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/deploy-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- run: |
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Setup SSH Agent
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Setup Git User
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Use Node.js 20.x
Expand All @@ -28,4 +35,4 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm ci
npx nx deploy demo --verbose
npx nx deploy demo
9 changes: 4 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- run: | # we need to fetch the develop branch or else `affected:test` (run by husky after @semantic-release/git) will not work
git fetch --depth=1
git checkout develop
uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
Expand All @@ -32,4 +29,6 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm ci
npm run release -- --verbose
git status
npx nx report
npx nx run-many -t release
3 changes: 3 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# Disable Husky on CI
[ -n "$CI" ] && exit 0

npx --no -- commitlint --edit "$1"
3 changes: 3 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# Disable Husky on CI
[ -n "$CI" ] && exit 0

npx nx affected --target test --parallel
2 changes: 1 addition & 1 deletion apps/demo/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"deploy": {
"executor": "@nx-dotnet/nx-ghpages:deploy",
"options": {
"remote": "https://github.com/tinesoft/ngx-cookieconsent.github.io.git",
"remote": "git@github.com:tinesoft/ngx-cookieconsent.git",
"directory": "dist/apps/demo"
}
}
Expand Down
13 changes: 2 additions & 11 deletions libs/ngx-cookieconsent/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,9 @@
"outputs": ["{options.outputFile}"]
},
"compodoc": {
"executor": "@twittwer/compodoc:compodoc",
"executor": "nx:run-commands",
"options": {
"tsConfig": "libs/ngx-cookieconsent/tsconfig.lib.json",
"outputPath": "dist/apps/demo/doc"
},
"configurations": {
"serve": {
"watch": true
},
"json": {
"exportFormat": "json"
}
"command": "npx compodoc --tsconfig libs/ngx-cookieconsent/tsconfig.lib.json --output dist/apps/demo/doc"
}
},
"release": {
Expand Down
Loading

0 comments on commit f4481a8

Please sign in to comment.