Skip to content

Commit 9a332a8

Browse files
committed
refactor publish workflow for clarity and consistency
1 parent 2005ac9 commit 9a332a8

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

.github/workflows/publish.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
name: Build and Deploy
1+
name: Deploy to GitHub Pages
2+
23
on:
34
push:
45
branches:
5-
- main
6+
- main # or your primary branch
67
workflow_dispatch:
7-
permissions:
8-
contents: write
8+
99
jobs:
1010
build-and-deploy:
11-
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
1211
runs-on: ubuntu-latest
1312
steps:
14-
- name: Checkout Repository
13+
- name: Checkout
1514
uses: actions/checkout@v4
1615

1716
- name: Install pnpm
1817
uses: pnpm/action-setup@v4
1918
with:
2019
version: 9
2120

22-
- name: Use Node.js
21+
- name: Setup Node.js
2322
uses: actions/setup-node@v4
2423
with:
25-
node-version: "20"
26-
cache: "pnpm"
24+
node-version: "20" # or your preferred Node.js version
25+
26+
- name: Install dependencies
27+
run: pnpm install
2728

28-
- name: Install and Build # This example project is built using pnpm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
29-
run: |
30-
pnpm install
31-
pnpm run build
29+
- name: Build project
30+
run: pnpm run build
3231

3332
- name: Deploy to GitHub Pages
34-
uses: JamesIves/github-pages-deploy-action@v4
33+
uses: peaceiris/actions-gh-pages@v4
3534
with:
36-
folder: dist # The folder the action should deploy.
35+
github_token: ${{ secrets.GITHUB_TOKEN }}
36+
publish_dir: ./dist # Assumes your build output is in 'dist'

0 commit comments

Comments
 (0)