mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-30 06:32:24 +00:00
- Changed the publish directory from './deploy' to './dist' to align with the new build output structure. - This adjustment ensures that the correct files are deployed to GitHub Pages.
77 lines
2.3 KiB
YAML
77 lines
2.3 KiB
YAML
name: Deploy to GitHub Pages
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: ['Version Bump']
|
|
types:
|
|
- completed
|
|
branches:
|
|
- main
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
concurrency:
|
|
group: deploy-gh-pages
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
deploy:
|
|
environment: Production
|
|
runs-on: ubuntu-latest
|
|
# Only run if the version-bump workflow succeeded
|
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20.x
|
|
cache: 'yarn'
|
|
|
|
- name: Install dependencies
|
|
run: yarn install --frozen-lockfile
|
|
|
|
- name: Build frontend
|
|
run: yarn build
|
|
env:
|
|
NODE_ENV: production
|
|
VITE_BACKEND_URL: ${{ vars.VITE_BACKEND_URL }}
|
|
VITE_TELEGRAM_BOT_USERNAME: ${{ secrets.VITE_TELEGRAM_BOT_USERNAME }}
|
|
VITE_TELEGRAM_BOT_ID: ${{ secrets.VITE_TELEGRAM_BOT_ID }}
|
|
VITE_TELEGRAM_API_ID: ${{ secrets.VITE_TELEGRAM_API_ID }}
|
|
VITE_TELEGRAM_API_HASH: ${{ secrets.VITE_TELEGRAM_API_HASH }}
|
|
VITE_SENTRY_DSN: ${{ secrets.VITE_SENTRY_DSN }}
|
|
VITE_SKILLS_GITHUB_REPO: ${{ vars.VITE_SKILLS_GITHUB_REPO }}
|
|
VITE_SKILLS_GITHUB_TOKEN: ${{ secrets.VITE_SKILLS_GITHUB_TOKEN }}
|
|
VITE_DEBUG: ${{ vars.VITE_DEBUG }}
|
|
|
|
- name: Deploy to GitHub Pages
|
|
uses: peaceiris/actions-gh-pages@v4
|
|
with:
|
|
personal_token: ${{ secrets.XGH_TOKEN }}
|
|
external_repository: alphahumanxyz/alphahuman
|
|
publish_dir: ./dist
|
|
publish_branch: gh-pages
|
|
commit_message: 'chore: deploy to gh-pages [skip ci]'
|
|
user_name: 'github-actions[bot]'
|
|
cname: app.alphahuman.xyz
|
|
force_orphan: true
|
|
user_email: 'github-actions[bot]@users.noreply.github.com'
|
|
|
|
- name: Update GH repo
|
|
uses: peaceiris/actions-gh-pages@v4
|
|
with:
|
|
personal_token: ${{ secrets.XGH_TOKEN }}
|
|
external_repository: alphahumanxyz/alphahuman
|
|
publish_dir: ./publish
|
|
publish_branch: main
|
|
user_name: 'github-actions[bot]'
|
|
user_email: 'github-actions[bot]@users.noreply.github.com'
|
|
commit_message: 'chore: update main branch [skip ci]'
|