From 6badd777250ebe0c684e46b5320d10e01fd106a6 Mon Sep 17 00:00:00 2001 From: Lovepreet Singh Jassal <17259255+lovepreetjassal@users.noreply.github.com> Date: Sat, 20 Apr 2024 20:58:04 -0400 Subject: [PATCH] Update ghpagesdeploy.yml --- .github/workflows/ghpagesdeploy.yml | 41 +++++++++-------------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ghpagesdeploy.yml b/.github/workflows/ghpagesdeploy.yml index 3de5f36..5f3b99c 100644 --- a/.github/workflows/ghpagesdeploy.yml +++ b/.github/workflows/ghpagesdeploy.yml @@ -1,38 +1,23 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - -name: Build and Deploy Script - +name: Build and Deploy on: push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - + branches: + - master jobs: build: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [20.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - steps: - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + - name: All things angular + uses: AhsanAyaz/angular-deploy-gh-pages-actions@[version] ## replace by latest version without it you will see Expected format {org}/{repo}[/path]@ref. Actual 'AhsanAyaz/angular-deploy-gh-pages-actions',Input string was not in a correct format. with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - #- run: npm ci - - run: npm install @angular/cli - - run: npm install - - run: npm run build --if-present - - name: Deploy to gh pages - run: | - npx angular-cli-ghpages --dir=dist/bockpit - env: - CI: true - GH_TOKEN: ${{ secrets.GH_TOKEN }} + github_access_token: ${{ secrets.GH_token }} # see the Configuration section for how you can create secrets + build_configuration: production # The build environment for the app. please look configurations in your angular.json + base_href: /bockpit/ # make sure this corresponds to https://.github.io// + deploy_branch: gh-pages # The branch the action should deploy to. + angular_dist_build_folder: dist/bockpit # The folder where your project is supposed to be after running ng build by the action. + +permissions: + contents: write # Allow write permission to GITHUB_TOKEN to commit to deploy branch.