-
Notifications
You must be signed in to change notification settings - Fork 13
53 lines (50 loc) · 1.42 KB
/
publish-website.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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