diff --git a/.github/workflows/quarto.yml b/.github/workflows/quarto.yml index 7cfd538..48cd38b 100644 --- a/.github/workflows/quarto.yml +++ b/.github/workflows/quarto.yml @@ -44,6 +44,7 @@ env: jobs: # a job called "build" build: + if: ${{ github.event_name != 'pull_request' }} # The type of runner that the job will run on runs-on: ubuntu-latest @@ -54,14 +55,8 @@ jobs: - name: checkout uses: actions/checkout@v4 - # setup gh pages - - name: setup pages - id: pages - uses: actions/configure-pages@v5 - # check if the artifacts exist already - name: restore-artifacts - if: ${{ github.event_name != 'pull_request' }} id: artifacts uses: actions/cache/restore@v4 with: @@ -118,12 +113,28 @@ jobs: gh pr create -B $BASE -H ${{ github.ref_name }} --title "PR for RUN_ID ${{ github.run_id }}" --body "PR for ${{ github.sha }}" --draft && \ gh auth logout + configure: + if: github.event_name == 'pull_request' && github.event.pull_request.merged == true + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + + # checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: checkout + uses: actions/checkout@v4 + + # setup gh pages + - name: setup pages + id: pages + uses: actions/configure-pages@v5 + # deploy job deploy: if: github.event_name == 'pull_request' && github.event.pull_request.merged == true - # # Add a dependency to the job - # needs: create_pull_request + # Add a dependency to the job + needs: configure # Deploy to the github-pages environment # Settings and variables here: https://github.com/jennylsmith/jennylsmith.github.io/settings/environments @@ -150,11 +161,11 @@ jobs: with: path: ${{ env.OUTPUT_DIR }} key: ${{ env.CACHE_KEY }} + fail-on-cache-miss: true - name: check-vars run: | - echo event: ${{ github.event_name }} merged: ${{ github.event.pull_request.merged }} - env | grep -Ei "actions|GITHUB_ENV" + env ls -alh ls -alh ${{ env.OUTPUT_DIR }} diff --git a/README.md b/README.md index db20441..0de46d8 100644 --- a/README.md +++ b/README.md @@ -16,15 +16,31 @@ using the following command in a terminal: quarto preview --render all --no-watch-inputs --no-browse ``` -For new features or fixes, create an issue on github and create a new branch with the changes. +### Contributing -Then open a pull request using `gh` commandline utility to merge changes into the `dev` branch, like the example below for issue #4. +For new features or fixes, create an issue on github and create a new branch with the changes. ``` -gh pr create -B dev -H [BRANCH TO MERGE] --title "collapsible bullet points for pipelines" --body "Closes #4" --draft [--dry-run] +PR=18 +ISSUE=4 +# view the PR +gh pr view $PR + +# ensure it passes checks and is mergeable +gh pr view $PR $--json mergeable +gh pr checks + +# mark draft as ready and merge using squash method +gh pr ready $PR +gh pr comment 18 --body "Related to $ISSUE" +gh pr merge $PR --squash -t 'Added new feat: XYZ' ``` +If this pull request closes the issue, it can be closed using the following: + ``` gh issue close -c "done" 4 ``` + +