gh-pages.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # .github/workflows/deploy.yml
  2. name: github pages
  3. on:
  4. push:
  5. branches:
  6. - master
  7. paths:
  8. - '.github/workflows/gh-pages.yml'
  9. - 'docs/**'
  10. jobs:
  11. deploy:
  12. runs-on: ubuntu-18.04
  13. defaults:
  14. run:
  15. working-directory: docs
  16. steps:
  17. - uses: actions/checkout@v2
  18. - name: Setup Node
  19. uses: actions/setup-node@v2.1.2
  20. with:
  21. node-version: '12.x'
  22. # - name: Get yarn cache
  23. # id: yarn-cache
  24. # run: echo "::set-output name=dir::$(yarn cache dir)"
  25. # - name: Cache dependencies
  26. # uses: actions/cache@v2
  27. # with:
  28. # path: ${{ steps.yarn-cache.outputs.dir }}
  29. # key: ${{ runner.os }}-website-${{ hashFiles('**/yarn.lock') }}
  30. # restore-keys: |
  31. # ${{ runner.os }}-website-
  32. # - run: yarn install --frozen-lockfile
  33. # - run: yarn build
  34. - run: npm install
  35. - run: npm run build
  36. - name: Deploy
  37. uses: peaceiris/actions-gh-pages@v3
  38. with:
  39. github_token: ${{ secrets.GITHUB_TOKEN }}
  40. publish_dir: ./docs/build