threepipe
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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
  2. # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
  3. name: Build docs and deploy to github pages.
  4. on:
  5. # Runs on pushes targeting the default branch
  6. push:
  7. branches: ["master"]
  8. # Allows you to run this workflow manually from the Actions tab
  9. workflow_dispatch:
  10. # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
  11. permissions:
  12. contents: read
  13. pages: write
  14. id-token: write
  15. # Allow one concurrent deployment
  16. concurrency:
  17. group: "pages"
  18. cancel-in-progress: true
  19. jobs:
  20. build-and-deploy:
  21. environment:
  22. name: github-pages
  23. url: ${{ steps.deployment.outputs.page_url }}
  24. runs-on: ubuntu-latest
  25. strategy:
  26. matrix:
  27. node-version: [18.x]
  28. # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
  29. steps:
  30. - uses: actions/checkout@v3
  31. - uses: actions/setup-node@v3
  32. with:
  33. node-version: ${{ matrix.node-version }}
  34. # cache: 'npm'
  35. # cache-dependency-path: '**/package-lock.json' # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-data
  36. - run: npm ci # this will also run `npm run prepare` which will build
  37. - run: npm run docs-all
  38. - run: mkdir _site
  39. - run: mv -t _site src docs dist examples README.md LICENSE index.html
  40. - run: mkdir -p _site/plugins
  41. - run: find plugins -maxdepth 2 -type d \( -name dist -o -name docs -name src \) -exec sh -c "mkdir -p _site/{} && cp -r {} _site/{}/.." \;
  42. - name: Setup Pages
  43. uses: actions/configure-pages@v3
  44. - name: Upload artifact
  45. uses: actions/upload-pages-artifact@v1
  46. with:
  47. path: '_site'
  48. - name: Deploy to GitHub Pages
  49. id: deployment
  50. uses: actions/deploy-pages@v1