Skip to content

docs: programmatic deployment blogpost (#752) #515

docs: programmatic deployment blogpost (#752)

docs: programmatic deployment blogpost (#752) #515

on:
push:
branches:
- main
env:
GHJK_VERSION: "2725af8"
jobs:
changes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
website:
- '.github/**'
- 'website/**'
outputs:
website: ${{ steps.filter.outputs.website }}
deploy:
needs: changes
if: ${{ needs.changes.outputs.website == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: metatypedev/setup-ghjk@2e8bbf084060a18828338a7cdd43fde6feb2a3cc
- uses: actions/cache@v4
with:
path: .venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock', '.ghjk/lock.json') }}
- shell: bash
env:
TG_URL: https://demo.metatype.dev
run: |
python3 -m venv .venv
source .venv/bin/activate
poetry install --no-root
cd website
pnpm install --frozen-lockfile
pnpm build
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: website/build
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"
cname: metatype.dev