From 35440cc7deb420d3b9ae29ee9dec9002414c6569 Mon Sep 17 00:00:00 2001 From: FaberVitale Date: Sun, 17 Dec 2023 10:30:46 +0100 Subject: [PATCH 1/4] chore: specify nvmrc file and update github action node version --- .github/workflows/deploy.yml | 2 +- .nvmrc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .nvmrc diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d8a666e..ebfd5b2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: 'lts/*' + node-version: '20.10.0' cache: 'pnpm' - name: Install dependencies diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..790e110 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v20.10.0 From ef31245d8ea2f4e82e023cfc5dd0b22ad44b45d9 Mon Sep 17 00:00:00 2001 From: FaberVitale Date: Sun, 17 Dec 2023 10:32:11 +0100 Subject: [PATCH 2/4] chore: bump pnpm version to latest --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fd36f41..41a7dc8 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "romajs-intro", "type": "module", "private": true, - "packageManager": "pnpm@8.7.5", + "packageManager": "pnpm@8.12.1", "scripts": { "build": "slidev build", "dev": "slidev --open", From 0f7ee2baf2b9cf7bfbc2c89476c2047196218cc0 Mon Sep 17 00:00:00 2001 From: FaberVitale Date: Sun, 17 Dec 2023 10:42:26 +0100 Subject: [PATCH 3/4] chore(CI): add ci pipeline --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..6c7907b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + env: + HUSKY: '0' + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: pnpm/action-setup@v2 + - uses: actions/setup-node@v3 + with: + node-version: '20.10.0' + cache: 'pnpm' + - name: log info + run: > + printf 'commit -> %s\nbranch -> %s\n' "$(git rev-parse --short HEAD)" "$(git branch --show-current)" + - name: Install dependencies + run: pnpm install --frozen-lockfile + - name: Build + run: pnpm run build From 1de7ef1fcbd65e0c850e55f2f9af6cc87c95ed0d Mon Sep 17 00:00:00 2001 From: FaberVitale Date: Sun, 17 Dec 2023 10:49:30 +0100 Subject: [PATCH 4/4] fix: do not run deploy pipeline on forks --- .github/workflows/deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ebfd5b2..1117ec4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -8,6 +8,8 @@ on: jobs: deploy: + if: github.repository == 'Roma-JS/roma-js-opening-slides' # prevents this action from running on forks + concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession. runs-on: ubuntu-latest permissions: