Deploy current main to GitHub Pages automatically - #72
beanbean9339 wants to merge 1 commit into
Conversation
|
|
||
| concurrency: | ||
| group: pages | ||
| cancel-in-progress: false |
There was a problem hiding this comment.
| cancel-in-progress: false | |
| cancel-in-progress: true |
In case of multiple PRs coming in.
egrace479
left a comment
There was a problem hiding this comment.
There seem to be a few redundancies here with the ci workflow. Small note: the pages related actions have newer versions, so suggested those.
|
|
||
| - name: Run tests | ||
| run: npm run test |
There was a problem hiding this comment.
| - 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 |
There was a problem hiding this comment.
| path: dist | |
| path: './dist' |
| - name: Validate metadata files | ||
| run: npm run validate:metadata | ||
|
|
There was a problem hiding this comment.
| - name: Validate metadata files | |
| run: npm run validate:metadata |
I think this is also part of the ci workflow.
| ### 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 |
There was a problem hiding this comment.
| 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 |
There was a problem hiding this comment.
| 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 |
There was a problem hiding this comment.
| uses: actions/deploy-pages@v4 | |
| uses: actions/deploy-pages@v5 | |
| run: npm run validate:metadata | ||
|
|
||
| - name: Configure Pages | ||
| uses: actions/configure-pages@v5 |
There was a problem hiding this comment.
| uses: actions/configure-pages@v5 | |
| uses: actions/configure-pages@v6 |
Summary
distartifact to GitHub Pages on every push tomain, with a manual trigger available.gh-pagesbranch 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; aGITHUB_TOKENpush 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).