Skip to content

Commit

Permalink
ci: re-enable docusaurus build and deploy only redirects file to prod…
Browse files Browse the repository at this point in the history
…uction
  • Loading branch information
amcgee committed Nov 27, 2024
1 parent 360432c commit 57a9c40
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/dhis2-deploy-netlify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ on:
push:
branches:
- master
paths:
- '/_redirects' # only rebuild and deploy when redirects file changes

concurrency:
group: ${{ github.workflow}}-${{ github.ref }}
Expand All @@ -28,10 +30,12 @@ jobs:
with:
node-version: 20.x

- name: Create redirects file for legacy netlify ui.dhis2.nu site
run: |
mkdir dist
cp ./docs/static/_redirects dist/_redirects
# We use Netlify only for deploy previews, production docs are hosted at developers.dhis2.org
# Don't build anything, just copy the _redirects file into the dist directory

- run: |
mkdir dist
cp _redirects dist/_redirects
- uses: nwtgck/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion docs/static/_redirects → _redirects
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Redirects to the developer portal
# Redirect legacy ui.dhis2.nu netlify site to the developer portal
/demo https://developers.dhis2.org/demo
/components/* https://developers.dhis2.org/docs/ui/components/:splat
/recipes/* https://developers.dhis2.org/docs/ui/recipes/:splat
Expand Down
1 change: 1 addition & 0 deletions scripts/build-world.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

yarn build:lib
yarn build:api
yarn workspace ui-docusaurus build
yarn workspace ui-storybook build

# If there are changes to files after we built, we need to run them
Expand Down

0 comments on commit 57a9c40

Please sign in to comment.