Skip to content

Commit 6da3078

Browse files
committed
github action to deploy github page
1 parent 68d9cb3 commit 6da3078

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

.github/workflows/deploy-github-page.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: Deploy GitHub Page
44
on:
55
# Runs on pushes targeting the default branch
66
push:
7-
branches: ['main']
7+
branches: ["main"]
88

99
# Allows you to run this workflow manually from the Actions tab
1010
workflow_dispatch:
@@ -17,7 +17,7 @@ permissions:
1717

1818
# Allow one concurrent deployment
1919
concurrency:
20-
group: 'pages'
20+
group: "pages"
2121
cancel-in-progress: true
2222

2323
jobs:
@@ -34,22 +34,26 @@ jobs:
3434
uses: actions/setup-node@v3
3535
with:
3636
node-version: 18
37-
registry-url: 'https://registry.npmjs.org'
37+
registry-url: "https://registry.npmjs.org"
3838
- name: Setup PNPM
39-
uses: pnpm/action-setup@v2.2.1
39+
uses: pnpm/action-setup@v2
4040
with:
41+
version: latest
4142
run_install: false
43+
4244
- name: Get pnpm store directory
43-
id: pnpm-cache
45+
shell: bash
4446
run: |
45-
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
47+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
48+
4649
- uses: actions/cache@v3
4750
name: Setup pnpm cache
4851
with:
49-
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
52+
path: ${{ env.STORE_PATH }}
5053
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
5154
restore-keys: |
5255
${{ runner.os }}-pnpm-store-
56+
5357
- name: Install dependencies
5458
run: pnpm install
5559
- name: Build
@@ -60,7 +64,7 @@ jobs:
6064
uses: actions/upload-pages-artifact@v1
6165
with:
6266
# Upload dist repository
63-
path: './dist'
67+
path: "./dist"
6468
- name: Deploy to GitHub Pages
6569
id: deployment
66-
uses: actions/deploy-pages@v1
70+
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)