feat(about): improve information about the site #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Eleventy | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | |
- uses: actions/cache@v3 | |
with: | |
key: mkdocs-material-${{ env.cache_id }} | |
path: .cache | |
restore-keys: | | |
mkdocs-material- | |
- run: pip install mkdocs-material | |
- name: Clone Code of Copper docs repository | |
uses: actions/checkout@v2 | |
with: | |
repository: GMDU/code-of-copper | |
path: docs/code_of_copper | |
ref: main | |
node-version: ${{ matrix.node-version }} | |
- name: Clone Moxlib docs repository | |
uses: actions/checkout@v2 | |
with: | |
repository: moxvallix/moxlib | |
path: docs/moxlib | |
ref: improved-documentation | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies & build | |
run: | | |
npm ci | |
npm run build | |
mkdir -p ./_site/docs/code_of_copper | |
mkdir -p ./_site/docs/moxlib | |
cd docs/code_of_copper | |
mkdocs build --site-dir ../../_site/docs/code_of_copper | |
cd ../moxlib | |
mkdocs build --site-dir ../../_site/docs/moxlib | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
publish_dir: ./_site | |
github_token: ${{ secrets.GITHUB_TOKEN }} |