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 a779681
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 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
12 changes: 7 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ 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
with:
# we need to fetch the develop branch or else `affected:test` (run by husky after @semantic-release/git) will not work
fetch-depth: 1
ref: 'develop'
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
Expand All @@ -32,4 +33,5 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm ci
npm run release -- --verbose
npx nx report
npx nx run-many -t release
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"build": "nx run-many -t build --parallel 3",
"test": "nx run-many -t test --parallel 3",
"lint": "nx run-many -t lint --parallel 3",
"release": "nx run-many --target release",
"release": "nx run-many -t release --all",
"graph": "nx graph",
"prepare": "husky install"
},
Expand Down

0 comments on commit a779681

Please sign in to comment.