From 983b3ac516c51c69ad57223d890e8cb119193a13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Wolak?= Date: Sun, 6 Mar 2022 14:19:03 +0100 Subject: [PATCH] fix(docs): fix gh-pages ci deploy --- .github/workflows/ci.yml | 10 +++++----- .github/workflows/codeql.yml | 2 +- .github/workflows/gh-pages.yml | 14 +++----------- .github/workflows/release.yml | 6 +++--- libs/angular-jss/package.json | 2 +- package.json | 7 +++++-- 6 files changed, 18 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1aad970..df49a83 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest if: ${{ github.event_name != 'pull_request' }} steps: - - name: Checkout [main] + - name: Checkout [main] 🛎️ uses: actions/checkout@v2 with: fetch-depth: 0 @@ -25,9 +25,9 @@ jobs: with: node-version: '14' - - name: Install Dependencies + - name: Install Dependencies 🔧 run: npm install --no-package-lock - + - run: npx nx-cloud start-ci-run - run: npx nx affected --target=build --parallel --max-parallel=3 - run: npx nx affected --target=test --parallel --max-parallel=2 @@ -36,7 +36,7 @@ jobs: runs-on: ubuntu-latest if: ${{ github.event_name == 'pull_request' }} steps: - - name: Checkout [main] + - name: Checkout [main] 🛎️ uses: actions/checkout@v2 with: ref: ${{ github.event.pull_request.head.ref }} @@ -64,7 +64,7 @@ jobs: matrix: agent: [1, 2, 3] steps: - - name: Checkout [main] + - name: Checkout [main] 🛎️ uses: actions/checkout@v2 - uses: actions/setup-node@v1 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 5b201e7..c6ad2e9 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -37,7 +37,7 @@ jobs: # Learn more about CodeQL language support at https://git.io/codeql-language-support steps: - - name: Checkout [main] + - name: Checkout [main] 🛎️ uses: actions/checkout@v2 # Initializes the CodeQL tools for scanning. diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index ebdcfc5..d356634 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -16,21 +16,13 @@ jobs: if: github.event.action == 'closed' && github.event.pull_request.merged == true runs-on: ubuntu-latest steps: - - name: Checkout [main] + - name: Checkout [main] 🛎️ uses: actions/checkout@v2 with: fetch-depth: 0 - - name: Install Dependencies + - name: Install Dependencies 🔧 run: npm install --no-package-lock - name: Build & Deploy 🚀 - run: npm run build -- --prod --baseHref=/angular-jss/ - - - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@v4.2.5 - with: - token: ${{ secrets.GITHUB_TOKEN }} - branch: gh-pages # The branch the action should deploy to. - folder: dist/apps/website # The folder the action should deploy. - clean: true # Automatically remove deleted files from the deploy branch + run: npm run deploy diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 610abec..95c74d3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,10 +17,10 @@ jobs: if: "!contains(github.event.head_commit.message, 'skip ci')" runs-on: ubuntu-latest steps: - - name: Checkout [main] + - name: Checkout [main] 🛎️ uses: actions/checkout@v2 - - name: Install Dependencies + - name: Install Dependencies 🔧 run: npm install --no-package-lock - name: Lint Workspace & Code @@ -31,7 +31,7 @@ jobs: - name: Unit Tests run: npm run affected:test -- --all - - name: Build, Release on GitHub & Publish to NPM + - name: Build, Release on GitHub & Publish to NPM 🚀 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN || secrets.GITHUB_TOKEN }} diff --git a/libs/angular-jss/package.json b/libs/angular-jss/package.json index c730c72..60b87bf 100644 --- a/libs/angular-jss/package.json +++ b/libs/angular-jss/package.json @@ -21,7 +21,7 @@ "bugs": { "url": "https://github.com/design4pro/angular-jss/issues/" }, - "homepage": "https://design4pro.github.io/angular-jss", + "homepage": "https://design4pro.github.io/angular-jss/", "peerDependencies": { "@angular/common": "^13.2.0", "@angular/core": "^13.2.0" diff --git a/package.json b/package.json index 5efb503..31c46bc 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "design4pro", "version": "0.0.0", "license": "MIT", - "homepage": "https://design4pro.github.io/angular-jss", + "homepage": "https://design4pro.github.io/angular-jss/", "scripts": { "postinstall": "node ./decorate-angular-cli.js && ngcc --properties es2015 browser module main", "ng": "nx", @@ -30,7 +30,9 @@ "dep-graph": "nx dep-graph", "help": "nx help", "prerelease": "nx affected:build --all", - "release": "nx affected --target release --all" + "release": "nx affected --target release --all", + "predeploy": "npm run build -- --prod --baseHref=/angular-jss/", + "deploy": "gh-pages -d dist/apps/webpage" }, "private": true, "dependencies": { @@ -82,6 +84,7 @@ "eslint": "~8.10.0", "eslint-config-prettier": "8.4.0", "eslint-plugin-cypress": "^2.10.3", + "gh-pages": "^3.2.3", "hasky": "^3.0.2", "jest": "27.2.3", "jest-preset-angular": "11.1.1",