Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Create an action for test deployments for docs builds #595

Merged
merged 11 commits into from
Nov 27, 2023

Conversation

MatthewL246
Copy link

Changes:

I created a job for the GitHub Pages action that uploads a test deployment to Cloudflare Pages. I tested this on my fork using my own Cloudflare account, see an example PR here: https://github.com/MatthewL246/FtcRobotController/pull/7.

Controls and Usage:

When you are making a documentation update, make sure to name your branch starting with docs/. After the build completes, you will receive a comment from the GitHub Actions bot on your PR with a link to a preview of the deployment.

Required steps before merging:

  1. Someone on the XBHS Cloudflare account should set up a Cloudflare Pages project for xbhs-robotics-docs.pages.dev.
  2. Create a secret in this repo named CLOUDFLARE_ACCOUNT_ID with the account ID.
  3. Create a secret in this repo named CLOUDFLARE_API_TOKEN with an API token that has edit access to Account.Cloudflare Pages.

Reviewers:

@XaverianTeamRobotics/senior-programmers

Closes #593.

@MatthewL246 MatthewL246 marked this pull request as ready for review November 22, 2023 03:06
@MatthewL246 MatthewL246 requested a review from a team as a code owner November 22, 2023 03:06
@MatthewL246 MatthewL246 marked this pull request as draft November 22, 2023 03:06
@michaell4438
Copy link
Member

Yeah I also do not have secrets access :( so lets not merge it right now

@michaell4438
Copy link
Member

I looked at the fork though and i do really like that change, so I think it is a needed one

@michaell4438 michaell4438 self-requested a review November 22, 2023 03:16
This should make the header links work in both production and test deployments.
Actually, this doesn't work as expected, since it causes queued deploys to be skipped.
Why is YAML such a weird format? The strings and arrays are so strange.
@MatthewL246
Copy link
Author

Alright, I think this is pretty much completed. We just need to set up Cloudflare and the secrets before merging.

@MatthewL246 MatthewL246 marked this pull request as ready for review November 22, 2023 18:28
@michaell4438
Copy link
Member

@MatthewL246 Maybe email roche today. I have the password for our cloud flare account if you need it

@MatthewL246
Copy link
Author

@michaell4438 Done. Did you reserve the Pages project domain?

@MatthewL246
Copy link
Author

Alright, the Cloudflare project is ready: xbhs-robotics-docs.pages.dev. I'll create the API token when necessary.

Copy link

Your docs changes were built successfully! View a preview of them at https://f382469e.xbhs-robotics-docs.pages.dev

@MatthewL246
Copy link
Author

@michaell4438 can i haz approval

@MatthewL246 MatthewL246 merged commit b8e2fbd into master Nov 27, 2023
7 checks passed
@MatthewL246 MatthewL246 deleted the docs/test-pages-on-docs-pr branch November 27, 2023 20:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add docs builds for branches other than master
2 participants