规范 Docker 部署环境变量的 JSON 格式 (#9) #133
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: pushDocs | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@main | |
| - name: Use Node.js 18 | |
| uses: actions/setup-node@v3.5.1 | |
| with: | |
| node-version: '18' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build VuePress | |
| run: yarn build | |
| - name: Deploy to Pages | |
| run: | | |
| cd docs/.vitepress/dist | |
| git init | |
| git branch -m master | |
| git config --global user.name "am-abudu" | |
| git config --global user.email "${{ secrets.GIT_EMAIL }}" | |
| git add -A | |
| git commit -m 'deploy' | |
| git push -f https://am-abudu:${{ secrets.ACCESS_TOKEN }}@github.com/Qexo/Wiki.git master:gh-pages | |
| - name: Deploy to My Blog | |
| run: | | |
| cd docs/.vitepress/dist | |
| rm -rf .git | |
| cd .. | |
| git clone https://am-abudu:${{ secrets.ACCESS_TOKEN }}@github.com/am-abudu/hexo_source_code.git | |
| mkdir -p hexo_source_code/source/qexo/ | |
| rm -rf hexo_source_code/source/qexo/* | |
| cp -r dist/* hexo_source_code/source/qexo/ | |
| cd hexo_source_code | |
| git add -A | |
| git commit -m 'deploy' | |
| git push -f https://am-abudu:${{ secrets.ACCESS_TOKEN }}@github.com/am-abudu/hexo_source_code.git |