Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update book.yml #3243

Merged
merged 3 commits into from
Dec 12, 2023
Merged

Update book.yml #3243

merged 3 commits into from
Dec 12, 2023

Conversation

Sweetdevil144
Copy link
Contributor

Update GitHub Actions Workflow for Documentation Deployment

Priority: High
Status: Ready for Review
Type: Bugfix

I do not have permission to select labels. I would like the labels "bug", "documentation", and "CI/CD" to be added.

Description

This PR updates the book.yml GitHub Actions workflow to fix an issue with the deployment of our documentation. The previous version of the workflow incorrectly identified branches as tags, leading to a misconfigured deployment process. Changes include:

  • Refining the if conditions to trigger deployments only on push events to master or develop branches, or when new tags are pushed.
  • Modifying the export VERSION line to correctly handle GitHub references that include slashes, ensuring branches and tags are correctly identified for versioning the documentation.

Motivation and Context

The current workflow is causing unnecessary directories to be created in our documentation repository, leading to clutter and confusion. This change is required to streamline our CI/CD process and make sure that only the necessary directories are created and maintained.

This PR addresses the workflow misconfiguration discussed in issue #3152 .


Review Time Estimate

  • Immediately
  • Within one week
  • When possible

Types of changes

Checklist:

  • My change requires a change to the documentation.
  • My name is in the list of CITATION.cff
  • I have updated the CHANGELOG.md.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@Sweetdevil144
Copy link
Contributor Author

PR breaks down the workflow. Test suites fail for the current workflow. I guess this was due to book.yml and would like to know how to proceed. I'm looking at the logs now. Would love ANY kind of help!!

@infotroph
Copy link
Member

infotroph commented Dec 10, 2023

@Sweetdevil144 I don't think these CI failures are related to your changes -- we've been fighting intermittent failures that I think are related to an out-of-date build image. I'm debugging the CI issues on my end and will review your changes once I've worked those out. Sorry for the wait.

@Sweetdevil144
Copy link
Contributor Author

Yeah sure. I can help you with that too if I can. Can you mention the workflows that are causing it?

@Sweetdevil144
Copy link
Contributor Author

Sweetdevil144 commented Dec 11, 2023

This is how the current changes look like :

    # ...
    # download documentation repo
    - name: Checkout documentation repo
      if: github.event_name == 'push'
      uses: actions/checkout@v3
      # ... rest of the step
    # upload new documentation
    - name: publish to github
      if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop')
      run: |
        # ... rest of the step

@Sweetdevil144
Copy link
Contributor Author

Hey @infotroph, I found many redundancies n the documentation. Can I correct some of them via this PR?

@infotroph
Copy link
Member

@Sweetdevil144 Better to make a separate PR so that we can get this one finished and merged, but yes to doing the corrections!

With ronkooper's suggestion to remove extra conditional statements.

Co-authored-by: Chris Black <[email protected]>
@infotroph infotroph added this pull request to the merge queue Dec 12, 2023
Merged via the queue into PecanProject:develop with commit 87c2085 Dec 12, 2023
7 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants