From a6f9d26c550dfb5503a74a66b1ace47afe3aa70e Mon Sep 17 00:00:00 2001 From: semanticdata Date: Thu, 7 Mar 2024 13:07:56 -0600 Subject: [PATCH] update workflows --- .github/workflows/deploy-pnpm.yml | 53 +++++++++++++++++++++++++++++++ .github/workflows/deploy.yml | 16 ++++------ 2 files changed, 60 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/deploy-pnpm.yml diff --git a/.github/workflows/deploy-pnpm.yml b/.github/workflows/deploy-pnpm.yml new file mode 100644 index 000000000..808e6d641 --- /dev/null +++ b/.github/workflows/deploy-pnpm.yml @@ -0,0 +1,53 @@ +name: Quartz - Deploy to GitHub Pages (pnpm) + +on: + workflow_dispatch: + # push: + # branches: + # - main + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + install: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + name: Checkout + with: + fetch-depth: 0 # Fetch all history for git info + - uses: actions/setup-node@v4 + name: Setup Node + with: + node-version: 18 + + build: + needs: install + runs-on: ubuntu-latest + steps: + - name: Install Dependencies + run: npm i + - name: Build Quartz Site + run: npx quartz build + - uses: actions/upload-pages-artifact@v3 + name: Upload artifact + with: + path: public + + deploy: + needs: build + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + uses: actions/deploy-pages@v4 + id: deployment diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 33a64b04f..c5bc0df73 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,4 +1,4 @@ -name: Quartz - Deploy to GitHub Pages +name: Quartz - Deploy to GitHub Pages (npm) on: workflow_dispatch: @@ -19,20 +19,18 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 # v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 # Fetch all history for git info - - uses: actions/setup-node@v3 # v3 + - uses: actions/setup-node@v4 with: - node-version: 20.11.0 # 18.14 - - name: PNPM Install - uses: ./.github/actions/pnpm-install + node-version: 18 - name: Install Dependencies - run: pnpm i # was npm i + run: npm i - name: Build Quartz run: npx quartz build - name: Upload artifact - uses: actions/upload-pages-artifact@v3 # v2 + uses: actions/upload-pages-artifact@v3 with: path: public @@ -45,4 +43,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 # v2 + uses: actions/deploy-pages@v4