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 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d8a666e..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: @@ -26,7 +28,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 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",