console/.github/workflows/website.yaml
Laurin Quast afa18ef7fc
docs: self-hosting changelog in documentation (#6060)
Co-authored-by: Kamil Kisiela <kamil.kisiela@gmail.com>
2024-12-02 14:52:00 +01:00

47 lines
1.5 KiB
YAML

on:
workflow_call:
jobs:
deployment:
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Get changed files
id: website-files
uses: tj-actions/changed-files@v45
with:
# Includes CHANGELOG.md, because we render it in our documentation
files: |
deployment/CHANGELOG.md
packages/web/docs/**
packages/web/landing-page/**
- name: setup environment
if: steps.website-files.outputs.any_changed == 'true'
uses: ./.github/actions/setup
with:
codegen: false
actor: website
cacheTurbo: false
- uses: the-guild-org/shared-config/website-cf@main
if: steps.website-files.outputs.any_changed == 'true'
name: build and deploy website
env:
NEXT_BASE_PATH: ${{ github.ref == 'refs/heads/main' && '/graphql/hive' || '' }}
SITE_URL:
${{ github.ref == 'refs/heads/main' && 'https://the-guild.dev/graphql/hive' || '' }}
with:
cloudflareApiToken: ${{ secrets.WEBSITE_CLOUDFLARE_API_TOKEN }}
cloudflareAccountId: ${{ secrets.WEBSITE_CLOUDFLARE_ACCOUNT_ID }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
projectName: hive-landing-page
prId: ${{ github.event.pull_request.number }}
mainBranch: main
websiteDirectory: ./
buildScript: cd packages/web/docs && pnpm build
artifactDir: packages/web/docs/out