Files
lodestar/.github/workflows/docs.yml
Nazar Hussain 4fd3d4d302 refactor: restructure to tests and CI workflow to reduce CI time (#5951)
* Enable debug logging for e2e tests

* Reduce the duration of lightclient test

* Run all e2e tests with minimal preset

* Fix the few e2e tests

* Fix test job names

* Fix the task script

* Add yarn cache to node actions

* Update few e2e tests after code review

* Fix the type export to use with transpilation

* Remove unused file

* Revert changes to an e2e test file

* Reduce the genesis delay

* Refactor workflow jobs

* Add .git-data to build cache

* Fix spec tests option

* Upgrade the github action version

* Add a package dev dependency

* Add artifact name

* Update the workflow to add env variables

* Update the workflow to add env variables

* Add tsnode option

* Parallelize the spec tests

* Add the ts-node configuration

* Update tsconfig for the e2e tests

* Update the tsconfig for the project

* Fix the types issue

* Remove unused file
2023-09-22 06:05:46 -04:00

60 lines
1.6 KiB
YAML

name: Deploy docs
on:
push:
branches:
- stable
jobs:
docs:
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
# <common-build> - Uses YAML anchors in the future
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
check-latest: true
cache: yarn
- name: Node.js version
id: node
run: echo "v8CppApiVersion=$(node --print "process.versions.modules")" >> $GITHUB_OUTPUT
- name: Restore dependencies
uses: actions/cache@master
id: cache-deps
with:
path: |
node_modules
packages/*/node_modules
key: ${{ runner.os }}-${{ steps.node.outputs.v8CppApiVersion }}-${{ hashFiles('**/yarn.lock', '**/package.json') }}
- name: Install & build
if: steps.cache-deps.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile && yarn build
- name: Build
run: yarn build
if: steps.cache-deps.outputs.cache-hit == 'true'
# </common-build>
- name: Build and collect docs
run: yarn build:docs
- name: Lint built docs
run: yarn lint-docs:fix
- name: Set up Python
uses: actions/setup-python@v1
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
- name: Build docs
run: mkdocs build --site-dir site -v --clean
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site