[U] Update actions

This commit is contained in:
2024-12-17 07:41:30 +08:00
committed by GitHub
parent db5bcc66ec
commit 6cd3484f7c
+6 -7
View File
@@ -13,18 +13,17 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- uses: actions/setup-node@v2.1.5 - uses: actions/setup-node@v4
- name: Cache node modules - name: Cache node modules
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: ~/node_modules node-version: 20
key: cache-${{ hashFiles('**/package-lock.json') }} cache: 'yarn'
- name: Install and build - name: Install and build
run: | run: |
yarn install
# pass --base if CNAME is not used # pass --base if CNAME is not used
# npm run build -- --base=/${{ github.event.repository.name }}/ # npm run build -- --base=/${{ github.event.repository.name }}/
yarn build yarn build
@@ -33,13 +32,13 @@ jobs:
cd dist cd dist
ln -s index.html 404.html ln -s index.html 404.html
- name: Deploy to github pages - name: Deploy to github pages
uses: JamesIves/github-pages-deploy-action@4.1.0 uses: JamesIves/github-pages-deploy-action@v4
with: with:
branch: gh-pages branch: gh-pages
folder: dist folder: dist
- name: Publish deployed code - name: Publish deployed code
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v4
with: with:
name: published name: published
path: dist path: dist