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

GH Pages/GH Actions: generate the documentation instead of committing it #419

Merged
merged 2 commits into from Jan 3, 2023

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Jan 3, 2023

Generate the documentation instead of committing it - step 1

This removes all files containing some form of "generated" documentation.
This includes:

  • The index.md file which is based on the README.md file in the project root.
  • All phpDocumentor generated documentation.

The configuration, structure and asset files for generating the documentation website remain.

Generate the documentation instead of committing it - step 2

This commit adds the following:

  • A GH Actions workflow.
    This workflow will:
    • Generate the files needed to create the website (phpDoc documentation, conversion of the README and CHANGELOG to the format desired for the website) and put them in the docs directory.
    • Build the Jekyll site based on the files in the docs directory.
      Both the configuration and structure files which live in the repo, as well as the generated files are used for this.
    • Deploy the website.
  • Three script files in the .github/GHPages directory to be used during the build process to:
    • Add the version number of the current release to the generated documentation.
    • Transform the README and CHANGELOG files to a format suitable for use in the website.
  • A README.md file to the docs directory to document how the documentation generation works and how to send in updates for the website.

Additionally, the following changes were made:

  • Until now, the website did not contain the Changelog. As this will now change, a link to the changelog is added to the sidebar.
  • The version number of the release on which the documentation was based was not previously listed on the documentation pages.
    The phpDocumentor configuration will be updated as part of the workflow run to add the version number (via one of the scripts).
  • As the website will now be automatically generated, the checklist in the release-checklist.md file has been updated to match the new process.
  • As the scripts in the .github/GHPages directory are not part of the package, but effectively "dev-tools", these scripts have been written with a PHP 7.2 minimum in mind. The CI PHP linting commands have been updated to allow for this.

Notes:

  • The GH Actions workflow will do a dry-run when any of the files involved in the build process are changed.
  • The GH Actions workflow will do an actual deploy when a new release is published, as well as on request by triggering the workflow.

The ghpages.yml workflow is can now be removed. That workflow was used to test whether the site could be build correctly, but is no longer needed now the update-docs.yml workflow does a dry-run whenever relevant.

@jrfnl
Copy link
Member Author

jrfnl commented Jan 3, 2023

Important: while this PR can be merged to develop, before the merge to stable for the 1.0.0 release, the GH Pages setup in Settings will need to be changed to build from GH Actions instead of expecting the site artifacts in the docs branch.

@jrfnl jrfnl mentioned this pull request Jan 3, 2023
5 tasks
@jrfnl jrfnl force-pushed the feature/ghactions-add-workflow-to-generate-website branch 4 times, most recently from 03000e2 to 2f85dab Compare January 3, 2023 13:48
This removes all files containing some form of "generated" documentation.
This includes:
* The `index.md` file which is based on the `README.md` file in the project root.
* All phpDocumentor generated documentation.

The configuration, structure and asset files for generating the documentation website remain.
This commit adds the following:
* A GH Actions workflow.
    This workflow will:
    - Generate the files needed to create the website (phpDoc documentation, conversion of the README and CHANGELOG to the format desired for the website) and put them in the `docs` directory.
    - Build the Jekyll site based on the files in the `docs` directory.
        Both the configuration and structure files which live in the repo, as well as the generated files are used for this.
    - Deploy the website.
* Three script files in the `.github/GHPages` directory to be used during the build process to:
    - Add the version number of the current release to the generated documentation.
    - Transform the README and CHANGELOG files to a format suitable for use in the website.
* A `README.md` file to the `docs` directory to document how the documentation generation works and how to send in updates for the website.

Additionally, the following changes were made:
* Until now, the website did not contain the Changelog. As this will now change, a link to the changelog is added to the sidebar.
* The version number of the release on which the documentation was based was not previously listed on the documentation pages.
    The phpDocumentor configuration will be updated as part of the workflow run to add the version number (via one of the scripts).
* As the website will now be automatically generated, the checklist in the `release-checklist.md` file has been updated to match the new process.
* As the scripts in the `.github/GHPages` directory are not part of the package, but effectively "dev-tools", these scripts have been written with a PHP 7.2 minimum in mind. The CI PHP linting commands have been updated to allow for this.

Notes:
* The GH Actions workflow will do a dry-run when any of the files involved in the build process are changed.
* The GH Actions workflow will do an actual deploy when a new release is published, as well as on request by triggering the workflow.

The `ghpages.yml` workflow is can now be removed. That workflow was used to test whether the site could be build correctly, but is no longer needed now the `update-docs.yml` workflow does a dry-run whenever relevant.
@jrfnl jrfnl force-pushed the feature/ghactions-add-workflow-to-generate-website branch from 2f85dab to b93b09a Compare January 3, 2023 13:49
@jrfnl jrfnl merged commit 117c807 into develop Jan 3, 2023
@jrfnl jrfnl deleted the feature/ghactions-add-workflow-to-generate-website branch January 3, 2023 21:37
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

1 participant