Bump vite from 5.4.19 to 5.4.21 #18
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
| # Script based on following guide: | |
| # https://kaizendorks.github.io/2020/04/16/vuepress-github-actions/ | |
| name: Deploy VitePress static site to GitHub pages | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| - name: Generate static VitePress files | |
| uses: actions/setup-node@v1 | |
| with: | |
| node-version: '21.x' | |
| - run: | | |
| npm install | |
| npm run docs:build | |
| - name: Init new repo in dist folder and commit generated files | |
| run: | | |
| cd .vitepress/dist | |
| echo "libre.solar" > CNAME | |
| git init | |
| git add -A | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| git commit -m 'deploy' | |
| - name: Force push to gh-pages branch | |
| if: github.ref == 'refs/heads/main' | |
| uses: ad-m/github-push-action@v0.8.0 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: gh-pages | |
| force: true | |
| directory: .vitepress/dist |