Skip to content

Commit

Permalink
ci: pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
skick1234 committed Apr 19, 2024
1 parent de848fc commit 08e459d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,40 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: latest

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
cache-dependency-path: pnpm-lock.yaml

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Checkout docs branch
uses: actions/checkout@v4
with:
ref: "distubejs/distubejs.github.io"
path: "docs"
repository: distubejs/distubejs.github.io
ref: gh-pages
path: gh-pages
token: ${{ secrets.DISTUBE_TOKEN }}

- name: Delete old docs
run: rm -rf docs
run: find gh-pages -mindepth 1 ! -regex 'gh-pages/\.git.*' ! -name 'CNAME' -exec rm -rf {} +

- name: Generate documentation
run: pnpm run docs

- name: Commit and push
run: |
cd docs
rsync -av docs/ gh-pages/
cd gh-pages
git config --local user.email github-actions@github.com
git config --local user.name github-actions
git add .
git commit -m "Docs build for ${{ github.ref_type }} ${{ github.ref_name }}: ${{ github.sha }}"
git commit -m "${{ github.repository }}@${{ github.sha }} 🚀"
git push
6 changes: 5 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: latest

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
cache-dependency-path: pnpm-lock.yaml
registry-url: "https://registry.npmjs.org"

- name: Install dependencies
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: latest

- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
cache-dependency-path: pnpm-lock.yaml

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<a href="https://github.com/skick1234/DisTube/actions" target="_blank"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/skick1234/DisTube/test.yml?branch=main&label=Tests&logo=github&style=flat-square" /></a>
<a href="https://nodejs.org/" target="_blank"><img alt="node-current" src="https://img.shields.io/node/v/distube?logo=node.js&logoColor=white&style=flat-square"/></a>
<a href="https://discord.js.org/" target="_blank"><img alt="npm peer dependency version" src="https://img.shields.io/npm/dependency-version/distube/peer/discord.js?label=discord.js&logo=discord&logoColor=white&style=flat-square"/></a>
<a href="https://depfu.com/github/skick1234/DisTube?project_id=36112" target="_blank"><img alt="Depfu" src="https://img.shields.io/depfu/dependencies/github/skick1234/DisTube?style=flat-square"/></a>
<a href="https://app.codecov.io/gh/skick1234/DisTube" target="_blank"><img alt="Codecov branch" src="https://img.shields.io/codecov/c/github/skick1234/DisTube/main?logo=codecov&logoColor=white&style=flat-square&token=WWDYRRSEQW"/></a>
<br/>
<a href="https://www.npmjs.com/package/distube" target="_blank"><img alt="npm" src="https://img.shields.io/npm/dt/distube?logo=npm&style=flat-square"/></a>
Expand Down

0 comments on commit 08e459d

Please sign in to comment.