More updating of docs #12
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: Build & Push VitePress Site to prod branch | |
on: | |
push: | |
branches: | |
- dev | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code from dev branch | |
uses: actions/checkout@v3 | |
with: | |
ref: dev | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Install dependencies | |
run: npm ci | |
- name: Build VitePress site | |
run: npm run docs:build | |
- name: Deploy built site to prod branch | |
working-directory: .vitepress/dist | |
run: | | |
git init | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
git add . | |
git commit -m "Deploy VitePress site" | |
git branch -M prod | |
git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git | |
git push -f origin prod |