|
|
|
name: Deploy GitHub Pages |
|
|
|
|
|
on: |
|
push: |
|
branches: |
|
- main |
|
|
|
|
|
jobs: |
|
build-and-deploy: |
|
|
|
runs-on: ubuntu-latest |
|
steps: |
|
|
|
- name: Checkout |
|
uses: actions/checkout@v2 |
|
with: |
|
fetch-depth: 0 |
|
|
|
|
|
- name: Setup Node.js environment |
|
uses: actions/setup-node@v1 |
|
with: |
|
node-version: "18.20.3" |
|
|
|
- name: Install yarn |
|
run: npm i yarn -g |
|
|
|
|
|
- name: Install dependencies |
|
run: cd documents && yarn install |
|
|
|
|
|
- name: Build |
|
run: cd documents && yarn docs:build |
|
|
|
|
|
- name: Deploy |
|
uses: crazy-max/ghaction-github-pages@v2 |
|
env: |
|
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} |
|
with: |
|
target-branch: gh-pages |
|
build_dir: documents/docs/.vitepress/dist |