12345678910111213141516171819202122232425262728293031323334353637 |
- name: Build and Deploy
- on: [ push, pull_request ]
- jobs:
- build-and-deploy:
- runs-on: ubuntu-latest
- environment:
- name: github-pages
- steps:
- - name: Checkout
- uses: actions/checkout@v3
-
- - name: Setup Node.js environment
- uses: actions/[email protected]
- with:
- node-version: "12.x"
-
- - name: Install dependencies
- run: npm install
-
- - name: Build
- run: npm run docs:build
-
- - name: Deploy
- run: |
- pwd
- cd docs/.vuepress/dist/
- pwd
- git init
- git config --global user.name "github-actions[bot]"
- git config --global user.email "${{ secrets.DRAGONOS_EMAIL }}"
- git branch
- git branch -m gh-pages && git checkout gh-pages
- git add .
- git commit -m "deploy"
- git push -f [email protected]:DragonOS-Community/OS_lab_tutorial.git gh-pages
- cd -
-
|