Skip to content

feat(docs@1.0.0-rc.1): new tool yay! #879

feat(docs@1.0.0-rc.1): new tool yay!

feat(docs@1.0.0-rc.1): new tool yay! #879

Workflow file for this run

name: https://hackbg.github.io/toolbox
on: [push]
jobs:
site:
name: build website
runs-on: ubuntu-latest
steps:
- name: Get the source with its submodules
uses: actions/checkout@v2
with: { submodules: "recursive" }
- name: Determine default branch
run: |
DEFAULT_BRANCH=$(git remote show origin | awk '/HEAD branch/ {print $NF}')
echo "default_branch=$DEFAULT_BRANCH" >> $GITHUB_ENV
echo "default_branch_ref=refs/heads/$DEFAULT_BRANCH" >> $GITHUB_ENV
- name: Setup Node and PNPM
uses: pnpm/action-setup@v2.0.1
with:
version: 8.5.1
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: Generate TS reference
run: NODE_OPTIONS=--max_old_space_size=8192 pnpm docs:typedoc
- name: Generate VitePress guide
run: VITEPRESS_BASE="/toolbox/${{ github.ref_name}}/" pnpm docs:vp:build
- name: Collect docs
run: |
mkdir -p dist/docs
mv .vitepress/dist/* dist/docs
- name: Publish docs
run: |
pwd
ls -al
ls -al ~
cat .git/config
git remote get-url origin
git fetch origin gh-pages
echo $(git show-ref --verify refs/remotes/origin/gh-pages | cut -c-40) > .git/refs/heads/gh-pages
mkdir ../page
mv dist/docs/* ../page
mv docs/ ../page/ts
git checkout gh-pages
git clean -fdx
touch .nojekyll
rm -rf "${{ github.ref_name }}"
mv ../page "${{ github.ref_name }}"
ls -al "${{ github.ref_name }}"
git config --global user.email "hello@hack.bg"
git config --global user.name "hack.bg"
git add .
git commit -m "🤖 built docs for ${{ github.ref_name }} @ $(date -u)" || true
git push -u origin gh-pages --force