Skip to content

Commit

Permalink
ci: enable cd pipeline on Github Pages
Browse files Browse the repository at this point in the history
commit 31b288b
Author: Jingchao Di <[email protected]>
Date:   Fri May 3 18:14:53 2024 +0800

    ci: fix

commit 470fe87
Author: Jingchao Di <[email protected]>
Date:   Fri May 3 17:25:29 2024 +0800

    ci: no 18.x for deploy

commit 24a46df
Author: Jingchao Di <[email protected]>
Date:   Fri May 3 17:24:11 2024 +0800

    cd: fix

commit a637c20
Author: Jingchao Di <[email protected]>
Date:   Fri May 3 17:20:09 2024 +0800

    ci: cd with ghp
  • Loading branch information
alswl committed May 3, 2024
1 parent 638cb6d commit 288b370
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: github pages

on:
push:
branches:
- master
- feat/cd

jobs:
deploy:
permissions:
contents: write
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: [20.x]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_version }}
registry-url: 'https://registry.yarnpkg.com'

- name: install pnpm
run: npm i pnpm@latest -g
- run: pnpm install
- run: pnpm build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
# if: github.ref == 'refs/heads/master'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist

0 comments on commit 288b370

Please sign in to comment.