pages.yml 973 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. name: Build and Deploy
  2. permissions:
  3. contents: write
  4. on:
  5. push:
  6. branches:
  7. - pages
  8. jobs:
  9. deploy:
  10. concurrency: ci-${{ github.ref }}
  11. runs-on: ubuntu-latest
  12. steps:
  13. - name: Checkout 🛎️
  14. uses: actions/checkout@v4
  15. - name: Install Node.js
  16. uses: actions/setup-node@v4
  17. with:
  18. node-version: 20
  19. registry-url: https://registry.npmjs.com/
  20. - uses: pnpm/action-setup@v3
  21. name: Install pnpm
  22. id: pnpm-install
  23. with:
  24. version: 9
  25. run_install: false
  26. - name: Deploy 🔧
  27. run: |
  28. pnpm install --no-frozen-lockfile
  29. sed -i "s#VITE_PUBLIC_PATH = /#VITE_PUBLIC_PATH = /vue-pure-admin/#g" $(pwd)/.env.production
  30. pnpm build
  31. cd dist
  32. touch README.md .nojekyll
  33. - name: Deploy 🚀
  34. uses: JamesIves/github-pages-deploy-action@v4
  35. with:
  36. folder: dist
  37. clean: true