2024-03-06 04:32:45 +00:00
|
|
|
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
|
|
|
|
|
2024-03-18 13:03:13 +00:00
|
|
|
- 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
|
|
|
|
|
2024-03-06 04:32:45 +00:00
|
|
|
- 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 }}'
|