You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
986 B

2 years ago
2 years ago
2 years ago
  1. name: Pages
  2. on:
  3. push:
  4. branches:
  5. - main # default branch
  6. jobs:
  7. pages:
  8. runs-on: ubuntu-latest
  9. permissions:
  10. contents: write
  11. steps:
  12. - uses: actions/checkout@v3
  13. with:
  14. token: ${{ secrets.GITHUB_TOKEN }}
  15. # If your repository depends on submodule, please see: https://github.com/actions/checkout
  16. submodules: recursive
  17. - name: Use Node.js 16.x
  18. uses: actions/setup-node@v2
  19. with:
  20. node-version: '16'
  21. - name: Cache NPM dependencies
  22. uses: actions/cache@v2
  23. with:
  24. path: node_modules
  25. key: ${{ runner.OS }}-npm-cache
  26. restore-keys: |
  27. ${{ runner.OS }}-npm-cache
  28. - name: Install Dependencies
  29. run: npm install
  30. - name: Build
  31. run: npm run build
  32. - name: Deploy
  33. uses: peaceiris/actions-gh-pages@v3
  34. with:
  35. github_token: ${{ secrets.GITHUB_TOKEN }}
  36. publish_dir: ./public