From c9c1625f88d37ad95f9183f2620e82098acff5cc Mon Sep 17 00:00:00 2001 From: mvincerra Date: Tue, 15 Oct 2024 04:25:52 -0700 Subject: [PATCH] Change ref to default branch as main (#2519) Signed-off-by: michael vincerra --- .github/workflows/github-pages.yml | 32 +++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml index 135a39cefe..6dde712aea 100644 --- a/.github/workflows/github-pages.yml +++ b/.github/workflows/github-pages.yml @@ -3,15 +3,15 @@ name: github-samples-app on: push: branches: - - master + - main - workflow_dispatch: + workflow_dispatch: # schedule: # - cron: '55 13 * * *' -# Top-level default; empty/no permissions -permissions: {} +# Top-level default; empty/no permissions +permissions: {} jobs: pages: @@ -33,36 +33,36 @@ jobs: ref: 'refs/heads/app/dev' - uses: actions/checkout@v3 - name: Check out master # checks out master in subdirectory + name: Check out main # checks out main in subdirectory with: - ref: 'refs/heads/master' - path: master - + ref: 'refs/heads/main' + path: main + - name: Build JSON DB run: | python3 -m pip install -r src/requirements.txt - echo master - python3 src/db.py master + echo main + python3 src/db.py main - - name: Remove JSON pre-prod - run: | + - name: Remove JSON pre-prod + run: | rm -rf src/docs/sample_db_pre.json - name: Build Sphinx - run: | + run: | python3 -m sphinx -W -b html src/docs/ src/docs/_build/ echo $PWD echo ${{ github.ref }} - name: Add GPU-Occupancy-Calculator - env: + env: GPU_OCC_CALC: src/docs/_build/Tools/GPU-Occupancy-Calculator/ run: | mkdir -p ${GPU_OCC_CALC} - cp -v ${{ github.workspace }}/master/Tools/GPU-Occupancy-Calculator/index.html ${GPU_OCC_CALC}/index.html + cp -v ${{ github.workspace }}/main/Tools/GPU-Occupancy-Calculator/index.html ${GPU_OCC_CALC}/index.html - name: Push docs - if: ${{ github.ref == 'refs/heads/master' }} # only if this workflow is run from the master branch, push docs + if: ${{ github.ref == 'refs/heads/main' }} # only if this workflow is run from the main branch, push docs env: GITHUB_USER: ${{ github.actor }} GITHUB_TOKEN: ${{ github.token }}