Skip to content

Commit 512a339

Browse files
committed
refactor: new deploy action and default baseUrl "/"
1 parent aefac3a commit 512a339

File tree

2 files changed

+39
-21
lines changed

2 files changed

+39
-21
lines changed

β€Ž.github/workflows/deploy.yml

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,50 @@
1-
name: auto-deploy hfidelis gh-pages
1+
name: gh-pages deploy ~hfidelis
22

33
on:
44
push:
5-
branches:
6-
- main
5+
branches: ['main']
6+
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: 'pages'
16+
cancel-in-progress: true
717

818
jobs:
9-
build-deploy:
19+
deploy:
20+
environment:
21+
name: github-pages
22+
url: ${{ steps.deployment.outputs.page_url }}
1023
runs-on: ubuntu-latest
11-
1224
steps:
13-
- name: Checkout πŸ›ŽοΈ
14-
uses: actions/checkout@master
25+
- name: checkout πŸ›ŽοΈ
26+
uses: actions/checkout@v4
27+
28+
- name: setup node.js πŸ“¦
29+
uses: actions/setup-node@v3
1530
with:
16-
persist-credentials: false
31+
node-version: 18
32+
cache: 'npm'
1733

18-
- name: Install Dependencies πŸ”§
19-
run: yarn install
34+
- name: install dependencies πŸ”§
35+
run: npm install
2036

21-
- name: Build Project πŸ—οΈ
22-
run: yarn build
23-
env:
24-
NODE_ENV: production
37+
- name: build project πŸ—οΈ
38+
run: npm run build
2539

26-
- name: Deploy Github Pages πŸš€
27-
if: ${{ github.event_name != 'pull_request' }}
28-
uses: peaceiris/actions-gh-pages@v3
29-
with:
30-
github_token: ${{ secrets.GITHUB_TOKEN }}
31-
publish_dir: dist
40+
- name: setup pages πŸ“„
41+
uses: actions/configure-pages@v3
42+
43+
- name: upload artifact πŸ“¦
44+
uses: actions/upload-pages-artifact@v2
45+
with:
46+
path: './dist'
47+
48+
- name: deploy gh-pages hfidelis.github.io πŸš€
49+
id: deployment
50+
uses: actions/deploy-pages@v2

β€Žvite.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@ export default defineConfig({
1313
'@': fileURLToPath(new URL('./src', import.meta.url))
1414
}
1515
},
16-
base: './'
1716
})

0 commit comments

Comments
Β (0)