mirror of
https://github.com/chrononeko/chronocat.git
synced 2024-11-22 15:36:57 +00:00
65 lines
1.8 KiB
YAML
65 lines
1.8 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: 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 }}'
|
||
|
|
||
|
- name: Publish to GitHub Pages
|
||
|
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: chrononeko/chrononeko.github.io
|
||
|
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 }}'
|