diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4e13141..3ad8381 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,10 +3,36 @@ name: CI Master on: push: branches: - - master + - 'dev-2.0.0' +# tags: +# - '*' jobs: - build-library: +# build-library: +# runs-on: ubuntu-latest +# steps: +# - name: Checkout repository +# uses: actions/checkout@v1 +# - name: Setup node +# uses: actions/setup-node@v1 +# with: +# node-version: "14" +# registry-url: https://registry.npmjs.org +# - name: Install dependencies +# run: | +# npm ci +# npm uninstall -g @angular/cli +# npm install -g @angular/cli@12 +# - name: Set Version +# run: sed -i "s/\[ci-version\]/${GITHUB_REF##*/}-$GITHUB_RUN_NUMBER/g" ./version.ts +# - name: Build Library +# run: ng build --project angular-toastify +# - name: Publish Library to NPM +# run: npm publish ./dist/angular-toastify +# env: +# NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} + + deploy-pages: runs-on: ubuntu-latest steps: - name: Checkout repository @@ -18,14 +44,12 @@ jobs: registry-url: https://registry.npmjs.org - name: Install dependencies run: | - npm ci + npm ci --force npm uninstall -g @angular/cli npm install -g @angular/cli@12 - - name: Set Version - run: sed -i "s/\[ci-version\]/${GITHUB_REF##*/}-$GITHUB_RUN_NUMBER/g" ./version.ts - - name: Build Library - run: ng build --project angular-toastify - - name: Publish Library to NPM - run: npm publish ./dist/angular-toastify + - name: Deploy pages env: - NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + ng build --base-href "/angular-toastify/" + npx angular-cli-ghpages --dir=dist/demo diff --git a/package-lock.json b/package-lock.json index 8408f0c..b8be635 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,7 +34,7 @@ "@types/jasmine": "~3.3.8", "@types/jasminewd2": "~2.0.3", "@types/node": "~8.9.4", - "angular-cli-ghpages": "^1.0.0-rc.2", + "angular-cli-ghpages": "^1.0.7", "codelyzer": "^5.0.0", "injection-js": "^2.4.0", "jasmine-core": "~3.4.0", @@ -3830,9 +3830,9 @@ "dev": true }, "node_modules/angular-cli-ghpages": { - "version": "1.0.0-rc.2", - "resolved": "https://registry.npmjs.org/angular-cli-ghpages/-/angular-cli-ghpages-1.0.0-rc.2.tgz", - "integrity": "sha512-oAAnu6hcNYZ5Scp1WrPUnwOHkz6JoPfwPd3b4BYifBHWlwRnB2/zXzqZRYn0vwi2aO9LqMVDbq/7dJlpAWz2LQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/angular-cli-ghpages/-/angular-cli-ghpages-1.0.7.tgz", + "integrity": "sha512-7uq+NSqmhVBnA1uimVQVoQfXP80aSJc/nZGdRUiADcTeRQFPamaQUbh4bn2EHiC9TJn44lDOEGnzdhAej0wz6w==", "dev": true, "dependencies": { "commander": "^3.0.0-0", @@ -3844,9 +3844,9 @@ "ngh": "angular-cli-ghpages" }, "peerDependencies": { - "@angular-devkit/architect": ">= 0.900 < 0.1300", - "@angular-devkit/core": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0", - "@angular-devkit/schematics": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0" + "@angular-devkit/architect": ">= 0.900 < 0.1602.0", + "@angular-devkit/core": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", + "@angular-devkit/schematics": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" } }, "node_modules/angular-cli-ghpages/node_modules/commander": { @@ -20805,9 +20805,9 @@ "dev": true }, "angular-cli-ghpages": { - "version": "1.0.0-rc.2", - "resolved": "https://registry.npmjs.org/angular-cli-ghpages/-/angular-cli-ghpages-1.0.0-rc.2.tgz", - "integrity": "sha512-oAAnu6hcNYZ5Scp1WrPUnwOHkz6JoPfwPd3b4BYifBHWlwRnB2/zXzqZRYn0vwi2aO9LqMVDbq/7dJlpAWz2LQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/angular-cli-ghpages/-/angular-cli-ghpages-1.0.7.tgz", + "integrity": "sha512-7uq+NSqmhVBnA1uimVQVoQfXP80aSJc/nZGdRUiADcTeRQFPamaQUbh4bn2EHiC9TJn44lDOEGnzdhAej0wz6w==", "dev": true, "requires": { "commander": "^3.0.0-0", diff --git a/package.json b/package.json index 1142613..45422ec 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "@types/jasmine": "~3.3.8", "@types/jasminewd2": "~2.0.3", "@types/node": "~8.9.4", - "angular-cli-ghpages": "^1.0.0-rc.2", + "angular-cli-ghpages": "^1.0.7", "codelyzer": "^5.0.0", "injection-js": "^2.4.0", "jasmine-core": "~3.4.0",