From 8d0c61660ade7bc3ca1381ca752154db22b57b55 Mon Sep 17 00:00:00 2001 From: beanbean9339 Date: Sat, 26 Sep 2026 23:15:03 -0400 Subject: [PATCH 1/2] ci: deploy tested main builds to GitHub Pages --- .github/workflows/deploy-pages.yml | 57 ++++++++++++++++++++++++++++++ README.md | 9 +++++ 2 files changed, 66 insertions(+) create mode 100644 .github/workflows/deploy-pages.yml diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml new file mode 100644 index 0000000..85bee49 --- /dev/null +++ b/.github/workflows/deploy-pages.yml @@ -0,0 +1,57 @@ +name: Deploy GitHub Pages + +on: + push: + branches: + - main + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: false + +jobs: + deploy: + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Checkout + uses: actions/checkout@v7 + + - name: Setup Node.js + uses: actions/setup-node@v7 + with: + node-version: 24 + cache: npm + + - name: Install dependencies + run: npm ci + + - name: Run tests + run: npm run test + + - name: Build + run: npm run build + + - name: Validate metadata files + run: npm run validate:metadata + + - name: Configure Pages + uses: actions/configure-pages@v5 + + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v4 + with: + path: dist + + - name: Deploy Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file diff --git a/README.md b/README.md index 8412f16..b070d34 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,15 @@ npm exec -- zenodraft metadata validate .zenodo.json During export, OpenCite validates generated `.zenodo.json` metadata. ZIP exports include `METADATA_VALIDATION.txt` for downstream provenance checks. +### 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 +the Vite site, and publishes `dist` to GitHub Pages. In the repository's +**Settings > Pages**, select **GitHub Actions** as the build and deployment +source. This replaces the previous `gh-pages` branch publishing setup; keep +that branch until the first workflow deployment succeeds. + ## GitHub Import Workflow 1. Paste a GitHub repository URL into the import field. From 64f99449312500675dbfc3efcd368e99d5a7cb29 Mon Sep 17 00:00:00 2001 From: beanbean9339 Date: Sun, 4 Oct 2026 17:38:20 -0400 Subject: [PATCH 2/2] ci: update GitHub Pages deployment workflow and README --- .github/workflows/deploy-pages.yml | 16 +++++----------- README.md | 5 +++-- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml index 85bee49..4b3f3db 100644 --- a/.github/workflows/deploy-pages.yml +++ b/.github/workflows/deploy-pages.yml @@ -13,7 +13,7 @@ permissions: concurrency: group: pages - cancel-in-progress: false + cancel-in-progress: true jobs: deploy: @@ -35,23 +35,17 @@ jobs: - name: Install dependencies run: npm ci - - name: Run tests - run: npm run test - - name: Build run: npm run build - - name: Validate metadata files - run: npm run validate:metadata - - name: Configure Pages - uses: actions/configure-pages@v5 + uses: actions/configure-pages@v6 - name: Upload Pages artifact - uses: actions/upload-pages-artifact@v4 + uses: actions/upload-pages-artifact@v5 with: - path: dist + path: './dist' - name: Deploy Pages id: deployment - uses: actions/deploy-pages@v4 \ No newline at end of file + uses: actions/deploy-pages@v5 diff --git a/README.md b/README.md index b070d34..6f4c607 100644 --- a/README.md +++ b/README.md @@ -95,8 +95,9 @@ During export, OpenCite validates generated `.zenodo.json` metadata. ZIP exports ### 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 -the Vite site, and publishes `dist` to GitHub Pages. In the repository's +manually). It installs dependencies, builds the Vite site, and publishes `dist` +to GitHub Pages. The CI workflow runs tests and metadata +validation. In the repository's **Settings > Pages**, select **GitHub Actions** as the build and deployment source. This replaces the previous `gh-pages` branch publishing setup; keep that branch until the first workflow deployment succeeds.