Skip to content

Update action.yml (#244) #317

Update action.yml (#244)

Update action.yml (#244) #317

Workflow file for this run

name: github pages
#on: [push] # debug
on:
push:
branches:
- devel
jobs:
framework-docs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Upgrade pip
run: |
# install pip=>20.1 to use "pip cache dir"
python -m pip install --upgrade pip
- name: Get pip cache dir
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: python -m pip install -r ./requirements.txt
- run: mkdocs build
- name: Archive framework docs
uses: actions/upload-artifact@v4
with:
name: framework-docs
path: |
site
api-docs:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache choosenim
id: cache-choosenim
uses: actions/cache@v4
with:
path: ~/.choosenim
key: ${{ runner.os }}-choosenim-stable
- name: Cache nimble
id: cache-nimble
uses: actions/cache@v4
with:
path: ~/.nimble
key: ${{ runner.os }}-nimble-${{ hashFiles('prologue.nimble') }}
restore-keys: |
${{ runner.os }}-nimble-
- name: Setup nim
uses: jiro4989/setup-nim-action@v2
with:
nim-version: stable
- name: Install Packages
run: nimble install -y
- name: Install extension
run: logue extension all
- name: Build API docs
run: nimble apis
- name: Archive API docs
uses: actions/upload-artifact@v4
with:
name: api-docs
path: |
docs/coreapi
docs/plugin
deploy-docs:
needs:
- framework-docs
- api-docs
runs-on: ubuntu-latest
steps:
- name: Download all docs
uses: actions/download-artifact@v4
- name: Check files
run: |
find .
- name: Setup docs
run: |
mv framework-docs/ docs/
rm -rf docs/coreapi docs/plugin
mv api-docs/coreapi api-docs/plugin docs/
- name: Deploy
if: success()
uses: crazy-max/[email protected]
with:
target_branch: gh-pages
build_dir: ./docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}