mirror of
https://github.com/chrononeko/chronocat.git
synced 2024-11-28 02:31:28 +00:00
57 lines
1.5 KiB
YAML
57 lines
1.5 KiB
YAML
name: docs
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
docs:
|
|
name: docs
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: 'false'
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20.3.1'
|
|
|
|
- name: Build Packages
|
|
run: |
|
|
corepack enable
|
|
yarn install --immutable
|
|
yarn build
|
|
yarn workspace @chronocat/docs build
|
|
shell: bash
|
|
|
|
- name: Upload Docs
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: chronocat-docs-${{ github.sha }}
|
|
path: packages/docs/build
|
|
|
|
- name: Build Packages
|
|
run: |
|
|
curl -fsSL -o - https://${{ secrets.DEPLOY_TOKEN }}@github.com/ilharp/chronocat-dist/archive/refs/heads/master.tar.gz | tar -zxvf - --strip-components=1 -C packages/docs/build
|
|
shell: bash
|
|
|
|
- name: Publish to Vercel
|
|
if: github.ref == 'refs/heads/master'
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
with:
|
|
personal_token: ${{ secrets.DEPLOY_TOKEN }}
|
|
user_name: 'Il Harper'
|
|
user_email: 'hi@ilharper.com'
|
|
external_repository: ilharp/chronocat-deploy
|
|
publish_branch: master
|
|
publish_dir: packages/docs/build
|
|
enable_jekyll: true # Not to create .nojekyll since this is not a gh page
|
|
commit_message: 'chore: publish ${{ github.sha }}'
|