- Lab
- A Cloud Guru
Deploying Documentation to GitHub Pages
Your company has developed a mobile application. The GitHub README has developer notes, but users report they are not helpful for troubleshooting common user issues. Marketing has worked with the Engineering team to create a user guide Markdown document. This will be updated with every release. You need to develop a GitHub Actions workflow to deploy this user guide to GitHub Pages so users can access the latest user guide with each release.
Path Info
Table of Contents
-
Challenge
Set Up Documentation to Deploy as Part of the Workflow
-
Fork this repo:
https://github.com/linuxacademy/content-github-actions-deep-dive-lesson
. Check out thelab
branch. -
You can clone the repo locally or use the GitHub interface. Check the
/.github/workflows/pipeline.yaml
file. The workflow contains jobs to run a linter and build an artifact. Create adocs
directory and auserguide.md
file at the root directory. Add some text to the file and save it. -
Add a job to the workflow to deploy the user guide file to GitHub Pages. This is an instance where a Community Action might save some time. Check the Pages URL to confirm the Markdown has been converted to html and published.
-
-
Challenge
Set Up a Trigger Condition for the Workflow
-
The docs are deploying with the pipeline, but the file hasn't been updated in the last few commits, leading to the docs still being out of date. Add a condition so the workflow doesn't run unless the user guide has been changed — that way, new code won't build without supporting documentation.
-
Update the user guide and push the changes to validate that the new changes have deployed.
-
Update the code file without changing the user guide and push those changes. Verify that the workflow doesn't run without updates to the docs.
-
What's a lab?
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.