From 1186df59465aea314393a2ae3db0d17b10ac0a8a Mon Sep 17 00:00:00 2001 From: Lucas Garron Date: Thu, 2 Jan 2025 08:03:02 -0800 Subject: [PATCH] Update workflows (matching conventions from `cubing.js`). --- .github/workflows/{check.yml => CI.yml} | 10 +++--- .github/workflows/{deploy.yml => pages.yml} | 38 ++++++++++----------- 2 files changed, 25 insertions(+), 23 deletions(-) rename .github/workflows/{check.yml => CI.yml} (51%) rename .github/workflows/{deploy.yml => pages.yml} (55%) diff --git a/.github/workflows/check.yml b/.github/workflows/CI.yml similarity index 51% rename from .github/workflows/check.yml rename to .github/workflows/CI.yml index 0ced278..a8a30ae 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/CI.yml @@ -1,9 +1,11 @@ -name: Check -on: pull_request +name: CI + +on: [pull_request, push] + jobs: check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - run: npm install - - run: npm run build + - run: make build + - run: make lint diff --git a/.github/workflows/deploy.yml b/.github/workflows/pages.yml similarity index 55% rename from .github/workflows/deploy.yml rename to .github/workflows/pages.yml index 69f646b..2e64b65 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/pages.yml @@ -1,31 +1,31 @@ -name: Deploy to GitHub Pages +name: icons.cubing.net + on: push: - branches: - - main + branches: [main] + +concurrency: + group: pages + cancel-in-progress: true + jobs: build-pages: runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [2.x] + steps: - uses: actions/checkout@v4 - - run: npm install - - run: npm run build - - name: Setup git config - run: | - git config --global user.email "actions@github.com" - git config --global user.name "GitHub Actions" - - name: Commit - run: | - git add -f www - git commit -m "Build for deploy" - - name: Build - run: | - npm ci - make build + - uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + - run: make build-site - name: Upload artifact - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v3 with: - path: ./www + path: ./dist/sites/icons.cubing.net/ retention-days: 1 deploy-pages: