threepipe
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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@v4
  31. - uses: actions/setup-node@v4
  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 # todo use --cache .npm
  37. env:
  38. DOT_ENV_CONTENT: ${{ secrets.examples_dot_env }}
  39. - run: npm run build-site # builds to _site
  40. - name: Upload artifact
  41. uses: actions/upload-pages-artifact@v3
  42. with:
  43. path: '_site'
  44. - name: Deploy to GitHub Pages
  45. id: deployment
  46. uses: actions/deploy-pages@v4