try move website to website repo

This commit is contained in:
Kjeld Schouten
2025-10-09 16:01:21 +02:00
parent 44b936b506
commit d5f6706aa6
661 changed files with 16 additions and 130696 deletions
+16 -84
View File
@@ -175,6 +175,14 @@ jobs:
if: github.event_name == 'push'
run: helm registry logout quay.io
- name: Checkout website repo
uses: actions/checkout@v3
with:
repository: trueforge-org/website
path: website # checkout into ./website
ref: main # branch to push to
token: "${{ secrets.BOT_TOKEN }}"
- name: Copy docs to website
if: needs.check_changes.outputs.changes_detected == 'true'
shell: bash
@@ -251,88 +259,12 @@ jobs:
#
#done < src/assets/contributors.json
- name: Setup Node
if: needs.check_changes.outputs.changes_detected == 'true' && needs.check_changes.outputs.changes_detected == 'true'
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version-file: ./website/.nvmrc
- name: Commit and push changes
run: |
cd website
git config user.name "TrueForge-Bot"
git config user.email "bot@trueforge.org
- name: Fix Package-Lock
if: needs.check_changes.outputs.changes_detected == 'true'
run: cd website && npm i --package-lock-only
- name: Setup astro Cache
if: needs.check_changes.outputs.changes_detected == 'true'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
# Cache for build and optimized images.
key: astro-${{ hashFiles('website/package-lock.json') }}
path: ./website/.astro
restore-keys: astro-
- name: Setup npm Cache
if: needs.check_changes.outputs.changes_detected == 'true'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
# Cache for npm
path: ~/website/.npm
key: npm-${{ hashFiles('website/package-lock.json') }}
restore-keys: npm-
- name: Setup node_modules Cache
id: modulescache
if: needs.check_changes.outputs.changes_detected == 'true'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
# Cache for npm and optimized images.
path: ./website/node_modules
key: modules-${{ hashFiles('website/package-lock.json') }}
- name: Install Packages
if: steps.modulescache.outputs.cache-hit != 'true' && needs.check_changes.outputs.changes_detected == 'true'
run: cd website && npm ci
- name: Check
if: needs.check_changes.outputs.changes_detected == 'true'
run: cd website && npm run check
- name: Build
if: needs.check_changes.outputs.changes_detected == 'true'
run: cd website && npm run build
- name: Publish to Cloudflare Pages
if: needs.check_changes.outputs.changes_detected == 'true'
id: cloudflare
continue-on-error: true
uses: cloudflare/pages-action@f0a1cd58cd66095dee69bfa18fa5efd1dde93bca # v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
# By default Cloudflare marks `main` as the "production" branch.
# So when this workflow is pushed to refs/heads/main, we set the branch to `main`/"production".
branch: ${{ github.ref == 'refs/heads/master' && 'main' || github.head_ref }}
# The project name in Cloudflare
projectName: website
directory: ./website/build
wranglerVersion: "3"
- name: Comment deploy url
if: github.event_name != 'push' && needs.check_changes.outputs.changes_detected == 'true'
continue-on-error: true
uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2
with:
message-id: cloudflare-deploy
message: |
### ✅ Deploy Preview ready!
| Name | Link |
|----------------------|-------------------------------------------------------------------------------|
|🔨 Latest commit | ${{ github.sha }} |
|🔍 Latest deploy log | https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} |
|😎 Deploy Preview Url | [${{ steps.cloudflare.outputs.url }}](${{ steps.cloudflare.outputs.url }}) |
|🌳 Environment | ${{ steps.cloudflare.outputs.environment }} |
---
- name: Release-and-Website Completed
if: needs.check_changes.outputs.changes_detected == 'true'
run: echo "DONE"
git add .
git diff-index --quiet HEAD || git commit -m "Update website with latest charts and docs"
git push origin main