Skip to content

publish website jobs for refs/heads/main #643

publish website jobs for refs/heads/main

publish website jobs for refs/heads/main #643

name: publish website
run-name: publish website jobs for ${{ github.ref }}
on:
push:
branches:
- main
env:
GHJK_VERSION: "v0.2.1"
jobs:
changes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
website:
- '.github/**'
- 'docs/metatype.dev/**'
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@318209a9d215f70716a4ac89dbeb9653a2deb8bc
- 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 docs/metatype.dev
pnpm install --frozen-lockfile
pnpm build
- uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/metatype.dev/build
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"
cname: metatype.dev