feat: 🐛 修复带有 hash 时无法正常加载的问题 #108
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Funny Cat | |
| on: | |
| - push | |
| jobs: | |
| buildstatic: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Setup node | |
| uses: actions/setup-node@v1 | |
| with: | |
| node-version: 18.x | |
| - name : Prepare NodePack | |
| run: | | |
| npm add cnpm --global | |
| npm install | |
| - name: Cache node modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
| - name: Setup Hugo | |
| uses: peaceiris/actions-hugo@v2 | |
| with: | |
| hugo-version: 0.129.0 | |
| extended: true | |
| - name: Generate Link List | |
| run: | | |
| node ./scripts/before/friendsData.js | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_ACCESS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_ACCESS_KEY }} | |
| - name: Generate Hugo | |
| run: | | |
| hugo --minify | |
| - name: Commit sitemap to Baidu | |
| run: | | |
| node ./scripts/after/sitemapCommit "./public/sitemap.xml" "${{ secrets.BAIDU_ZZT_URL }}" | |
| - name: Static Files Pre Set | |
| run: | | |
| node ./scripts/after/fileExtened | |
| - name: NPM Publish Pre Set | |
| run: | | |
| node ./scripts/after/pkgUpdate | |
| - name: NPM Publish | |
| run: | | |
| npm config set _authToken=${{ secrets.NPM_T }} | |
| npm config fix | |
| cd ./public | |
| ls | |
| npm publish --access=public | |
| - name: Refresh cache | |
| run: | | |
| cnpm sync @floatsheep/fsl-blog |