From 5b68d8eaf934028e852c5cb4e4538010a7f3b15b Mon Sep 17 00:00:00 2001 From: Jarrett Keifer Date: Fri, 18 Jul 2025 17:12:59 -0700 Subject: [PATCH 1/3] add ci/cd workflows --- .github/workflows/ci.yml | 26 +++++++++++++++++++ .github/workflows/deploy.yml | 49 ++++++++++++++++++++++++++++++++++++ docusaurus.config.ts | 4 +-- 3 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..6893e64 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,26 @@ +name: Test deployment + +on: + pull_request: + branches: + - main + +jobs: + test-deploy: + name: Test deployment + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version: 18 + cache: npm + + - name: Install dependencies + run: npm ci + - name: Lint + run: npm run lint + - name: Test build website + run: npm build diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..0a024d0 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,49 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: + - main + +jobs: + build: + name: Build Docusaurus + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version: 18 + cache: npm + + - name: Install dependencies + run: npm ci + - name: Build website + run: npm build + + - name: Upload Build Artifact + uses: actions/upload-pages-artifact@v3 + with: + path: build + + deploy: + name: Deploy to GitHub Pages + needs: build + + # Grant GITHUB_TOKEN the permissions required to make a Pages deployment + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + + # Deploy to the github-pages environment + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/docusaurus.config.ts b/docusaurus.config.ts index e48859f..b2abb05 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -15,10 +15,10 @@ const config: Config = { }, // Set the production url of your site here - url: 'https://ccrp.example.com', + url: 'https://jkeifer.github.io', // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' - baseUrl: '/', + baseUrl: '/ccrp/', // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. From b578f08efc776977108bbbd8467b5de571794300 Mon Sep 17 00:00:00 2001 From: Jarrett Keifer Date: Fri, 18 Jul 2025 17:16:55 -0700 Subject: [PATCH 2/3] use newer node version --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6893e64..ef70851 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 24 cache: npm - name: Install dependencies From ce94d07fffcf92fd28d119a5301dfb954a251d84 Mon Sep 17 00:00:00 2001 From: Jarrett Keifer Date: Fri, 18 Jul 2025 17:17:42 -0700 Subject: [PATCH 3/3] fix up some other workflow issues --- .github/workflows/ci.yml | 2 +- .github/workflows/deploy.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ef70851..de266da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,4 +23,4 @@ jobs: - name: Lint run: npm run lint - name: Test build website - run: npm build + run: npm run build diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0a024d0..d80f50f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,13 +15,13 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 24 cache: npm - name: Install dependencies run: npm ci - name: Build website - run: npm build + run: npm run build - name: Upload Build Artifact uses: actions/upload-pages-artifact@v3