From ed27e1e5670c44ccc57292a737015ecfccaff89f Mon Sep 17 00:00:00 2001 From: semanticdata Date: Fri, 8 Mar 2024 13:00:24 -0600 Subject: [PATCH] new workflows --- .github/workflows/build-only.yml | 34 ++++++++++++++ .github/workflows/deploy.yml | 10 ++--- .../{deploy-test.yml => old-deploy-test.yml} | 4 +- .github/workflows/old-deploy.yml | 44 +++++++++++++++++++ 4 files changed, 85 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/build-only.yml rename .github/workflows/{deploy-test.yml => old-deploy-test.yml} (92%) create mode 100644 .github/workflows/old-deploy.yml diff --git a/.github/workflows/build-only.yml b/.github/workflows/build-only.yml new file mode 100644 index 0000000..83f0cba --- /dev/null +++ b/.github/workflows/build-only.yml @@ -0,0 +1,34 @@ +name: Build and Test (npm) + +on: + workflow_dispatch: + pull_request: + # push: + # branches: + # - main + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build: + 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 + - name: Install dependencies + run: npm i + - name: Build the site + run: npm run build \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3885d85..add6b51 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,9 +2,9 @@ name: Deploy to GitHub Pages (npm) on: workflow_dispatch: - # push: - # branches: - # - main + push: + branches: + - main permissions: contents: read @@ -22,9 +22,9 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 # Fetch all history for git info - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: - node-version: 20.11.0 + node-version: 18 - name: Install dependencies run: npm i - name: Build diff --git a/.github/workflows/deploy-test.yml b/.github/workflows/old-deploy-test.yml similarity index 92% rename from .github/workflows/deploy-test.yml rename to .github/workflows/old-deploy-test.yml index f4a8803..1d5ac54 100644 --- a/.github/workflows/deploy-test.yml +++ b/.github/workflows/old-deploy-test.yml @@ -22,9 +22,9 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 # Fetch all history for git info - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: - node-version: 20.11.0 + node-version: 18 - name: Install dependencies run: npm i - name: Build diff --git a/.github/workflows/old-deploy.yml b/.github/workflows/old-deploy.yml new file mode 100644 index 0000000..691f384 --- /dev/null +++ b/.github/workflows/old-deploy.yml @@ -0,0 +1,44 @@ +name: Deploy to GitHub Pages (npm) + +on: + workflow_dispatch: + # push: + # branches: + # - main + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Fetch all history for git info + - uses: actions/setup-node@v4 + with: + node-version: 18 + - name: Install dependencies + run: npm i + - name: Build + run: npm run build + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + + deploy: + needs: build + 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