mirror of
https://github.com/facebook/docusaurus.git
synced 2025-12-25 17:22:50 +00:00
Some checks failed
Argos CI / take-screenshots (push) Has been cancelled
Build Hash Router / Build Hash Router (push) Has been cancelled
Canary Release / Publish Canary (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Continuous Releases / Continuous Releases (push) Has been cancelled
E2E Tests / E2E — Yarn v1 (20) (push) Has been cancelled
E2E Tests / E2E — Yarn v1 (20.0) (push) Has been cancelled
E2E Tests / E2E — Yarn v1 (22) (push) Has been cancelled
E2E Tests / E2E — Yarn v1 (24) (push) Has been cancelled
E2E Tests / E2E — Yarn v1 (25.1) (push) Has been cancelled
E2E Tests / E2E — Yarn v1 Windows (push) Has been cancelled
E2E Tests / E2E — Yarn Berry (node-modules, -s) (push) Has been cancelled
E2E Tests / E2E — Yarn Berry (node-modules, -st) (push) Has been cancelled
E2E Tests / E2E — Yarn Berry (pnp, -s) (push) Has been cancelled
E2E Tests / E2E — Yarn Berry (pnp, -st) (push) Has been cancelled
E2E Tests / E2E — npm (push) Has been cancelled
E2E Tests / E2E — pnpm (push) Has been cancelled
Co-authored-by: slorber <749374+slorber@users.noreply.github.com>
85 lines
2.5 KiB
YAML
85 lines
2.5 KiB
YAML
name: Build Hash Router
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- docusaurus-v**
|
|
paths:
|
|
- packages/**
|
|
- .github/workflows/build-hash-router.yml
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build:
|
|
name: Build Hash Router
|
|
timeout-minutes: 30
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
- name: Set up Node
|
|
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
|
with:
|
|
node-version: lts/*
|
|
cache: yarn
|
|
- name: Installation
|
|
run: yarn || yarn || yarn
|
|
|
|
- name: Build Hash Router
|
|
run: yarn build:website:fast
|
|
env:
|
|
DOCUSAURUS_PERF_LOGGER: 'true'
|
|
DOCUSAURUS_ROUTER: 'hash'
|
|
# Note: hash router + baseUrl do not play well together
|
|
# This would host at https://facebook.github.io/docusaurus/#/docusaurus/
|
|
# BASE_URL: '/docusaurus/' # hash router +
|
|
|
|
- name: Upload Website artifact
|
|
uses: actions/upload-artifact@v5
|
|
with:
|
|
name: website-hash-router-archive
|
|
path: website/build
|
|
|
|
#- name: Upload Website Pages artifact
|
|
# uses: actions/upload-pages-artifact@v3
|
|
# with:
|
|
# path: website/build
|
|
|
|
# Deploy to https://facebook.github.io/docusaurus/
|
|
- name: Deploy to GitHub Pages
|
|
if: ${{ github.event_name != 'pull_request' && github.ref_name == 'main' }}
|
|
uses: peaceiris/actions-gh-pages@v4
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: website/build
|
|
|
|
## TODO we should be able to use this new deploy-pages action
|
|
## However this requires a Meta admin to configure it here
|
|
## https://github.com/facebook/docusaurus/settings/pages
|
|
## So for now we keep using the former method
|
|
## See https://docusaurus.io/docs/deployment#triggering-deployment-with-github-actions
|
|
#deploy:
|
|
# name: Deploy to GitHub Pages
|
|
# if: ${{ github.event_name != 'pull_request' && github.ref_name == 'main' }}
|
|
# needs: build
|
|
# permissions:
|
|
# pages: write
|
|
# id-token: write
|
|
# environment:
|
|
# name: github-pages
|
|
# url: ${{ steps.deployment.outputs.page_url }}
|
|
# runs-on: ubuntu-latest
|
|
# steps:
|
|
# - name: Deploy to GitHub Pages
|
|
# id: deployment
|
|
# uses: actions/deploy-pages@v4
|