build.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # Sample workflow for building and deploying a Jekyll site to GitHub Pages
  2. name: Deploy Jekyll with GitHub Pages dependencies preinstalled
  3. on:
  4. # Runs on pushes targeting the default branch
  5. push:
  6. branches: ["main"]
  7. # Allows you to run this workflow manually from the Actions tab
  8. workflow_dispatch:
  9. # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
  10. permissions:
  11. contents: read
  12. pages: write
  13. id-token: write
  14. # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
  15. # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
  16. concurrency:
  17. group: "pages"
  18. cancel-in-progress: false
  19. jobs:
  20. # Build job
  21. build:
  22. runs-on: ubuntu-latest
  23. steps:
  24. - name: Checkout
  25. uses: actions/checkout@v3
  26. - name: Setup Pages
  27. uses: actions/configure-pages@v3
  28. - name: Setup Node.js environment
  29. uses: actions/[email protected]
  30. with:
  31. node-version: 12.x
  32. - name: Run docs
  33. run: |
  34. set -e
  35. npm install
  36. npm run docs:build
  37. cd docs/.vuepress/dist
  38. git init
  39. git add -A
  40. git commit -m "deploy"
  41. git push -f [email protected]:DragonOS-Community/OS_lab_tutorial.git master:gh-pages
  42. cd -