From 0ee0e07bc02579b0ff0aa787865e9f1cfa8a8ed6 Mon Sep 17 00:00:00 2001 From: Tine Kondo Date: Tue, 9 Jan 2024 19:52:06 +0100 Subject: [PATCH] chore: fix `release` and `deploy` pipelines --- .github/workflows/deploy-demo.yml | 13 ++++++++++--- .github/workflows/release.yml | 11 ++++++----- apps/demo/project.json | 2 +- package.json | 2 +- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy-demo.yml b/.github/workflows/deploy-demo.yml index 3c2630f..7c35e1f 100644 --- a/.github/workflows/deploy-demo.yml +++ b/.github/workflows/deploy-demo.yml @@ -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/ssh-agent@v0.8.0 + 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 @@ -28,4 +35,4 @@ jobs: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: | npm ci - npx nx deploy demo --verbose + npx nx deploy demo diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d78f725..6061306 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: @@ -32,4 +33,4 @@ jobs: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: | npm ci - npm run release -- --verbose + npm run release \ No newline at end of file diff --git a/apps/demo/project.json b/apps/demo/project.json index 88d4bb0..1995b6d 100644 --- a/apps/demo/project.json +++ b/apps/demo/project.json @@ -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" } } diff --git a/package.json b/package.json index 3e20a81..d576515 100644 --- a/package.json +++ b/package.json @@ -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" },