Skip to content

Deploy current main to GitHub Pages automatically - #72

Open
beanbean9339 wants to merge 1 commit into
mainfrom
ci/deploy-pages-on-main
Open

beanbean9339 wants to merge 1 commit into
mainfrom
ci/deploy-pages-on-main

Conversation

@beanbean9339

@beanbean9339 beanbean9339 commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Build and deploy the Vite dist artifact to GitHub Pages on every push to main, with a manual trigger available.
  • Run tests and root metadata validation before publishing.
  • Document the one-time Pages setting change and retain the existing gh-pages branch until the first successful workflow deployment.

Tracks #73 for the Pages source switch and live deployment verification. Keep that issue open until the deployed site updates automatically.

One-time setting after merge

In Settings > Pages > Build and deployment > Source, select GitHub Actions. The current legacy branch-based Pages source uses gh-pages; a GITHUB_TOKEN push to that branch does not reliably trigger a Pages rebuild, so this PR uses the official artifact deployment actions instead.

Validation

npm run test (104 passed), npm run validate:metadata (passed), npm run build (passed).

@beanbean9339

Copy link
Copy Markdown
Collaborator Author

Tracking issue: #73. This PR adds the automatic Pages deployment workflow; #73 stays open for the one-time Pages source switch and verification that a later push to main updates the live site.


concurrency:
group: pages
cancel-in-progress: false

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cancel-in-progress: false
cancel-in-progress: true

In case of multiple PRs coming in.

@egrace479 egrace479 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seem to be a few redundancies here with the ci workflow. Small note: the pages related actions have newer versions, so suggested those.

Comment on lines +37 to +39

- name: Run tests
run: npm run test

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- name: Run tests
run: npm run test

Tests are run with the ci workflow before a PR is merged, no?

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v4
with:
path: dist

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
path: dist
path: './dist'

Comment on lines +44 to +46
- name: Validate metadata files
run: npm run validate:metadata

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- name: Validate metadata files
run: npm run validate:metadata

I think this is also part of the ci workflow.

Comment thread README.md
### GitHub Pages deployment

The `Deploy GitHub Pages` workflow runs on every push to `main` (and can be run
manually). It installs dependencies, runs tests and metadata validation, builds

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
manually). It installs dependencies, runs tests and metadata validation, builds
manually). It installs dependencies, builds

Following their removal. Since we have branch protections, there is no push to main without a PR first; tests and metadata validation are run with the PRs, so no need to run again.

uses: actions/configure-pages@v5

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v4

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uses: actions/upload-pages-artifact@v4
uses: actions/upload-pages-artifact@v5


- name: Deploy Pages
id: deployment
uses: actions/deploy-pages@v4 No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v5

run: npm run validate:metadata

- name: Configure Pages
uses: actions/configure-pages@v5

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uses: actions/configure-pages@v5
uses: actions/configure-pages@v6

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants