diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml index db9f30c..714467f 100644 --- a/.github/workflows/deploy-gh-pages.yml +++ b/.github/workflows/deploy-gh-pages.yml @@ -1,51 +1,23 @@ -# This is a basic workflow to help you get started with Actions - -name: CI - -# Controls when the workflow will run +name: Build and Deploy on: - # Triggers the workflow on push or pull request events but only for the "main" branch push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel + branches: + - main jobs: - # This workflow contains a single job called "build" build: - # The type of runner that the job will run on + runs-on: ubuntu-latest - # Steps represent a sequence of tasks that will be executed as part of the job steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + - name: All things angular + uses: AhsanAyaz/angular-deploy-gh-pages-actions@v1.4.0 ## 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: + github_access_token: ${{ secrets.GITHUB_TOKEN }} # see the Configuration section for how you can create secrets + build_configuration: staging # The build environment for the app. please look configurations in your angular.json + base_href: /local-analyzer-angular/ # make sure this corresponds to https://.github.io// + deploy_branch: gh-pages # The branch the action should deploy to. + angular_dist_build_folder: dist/local-analyzer # The folder where your project is supposed to be after running ng build by the action. - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - - name: Cache node modules - id: cache-nodemodules - uses: actions/cache@v2 - env: - cache-name: cache-node-modules - with: - # caching node_modules - path: node_modules - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - name: Install Dependencies - if: steps.cache-nodemodules.outputs.cache-hit != 'true' - run: | - npm ci - - name: Build - run: | - npm run build +permissions: + contents: write # Allow write permission to GITHUB_TOKEN to commit to deploy branch.