From 59c026d4d85ff70e548eca17da1ee1affc8f1b97 Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Thu, 11 Apr 2024 15:24:02 +0200 Subject: [PATCH] Get deploy to work on codeberg --- .domains | 1 + README.md | 18 +++++------------- docusaurus.config.js | 4 +++- src/pages/index.js | 2 +- 4 files changed, 10 insertions(+), 15 deletions(-) create mode 100644 .domains diff --git a/.domains b/.domains new file mode 100644 index 0000000..2e4c89e --- /dev/null +++ b/.domains @@ -0,0 +1 @@ +pzp.wiki \ No newline at end of file diff --git a/README.md b/README.md index aaba2fa..af69995 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,13 @@ This website is built using [Docusaurus 2](https://docusaurus.io/), a modern sta ### Installation ``` -$ yarn +$ npm i ``` ### Local Development ``` -$ yarn start +$ npm start ``` This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. @@ -19,23 +19,15 @@ This command starts a local development server and opens up a browser window. Mo ### Build ``` -$ yarn build +$ npm build ``` This command generates static content into the `build` directory and can be served using any static contents hosting service. ### Deployment -Using SSH: - ``` -$ USE_SSH=true yarn deploy +$ npm run deploy ``` -Not using SSH: - -``` -$ GIT_USER= yarn deploy -``` - -If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. +This builds and puts the built files into the `pages` branch and pushes it to codeberg which updates production. diff --git a/docusaurus.config.js b/docusaurus.config.js index e33e745..e4d3ae3 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -18,8 +18,10 @@ const config = { // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. - organizationName: 'staltz', // Usually your GitHub org/user name. + organizationName: 'pzp', // Usually your GitHub org/user name. projectName: 'pzp-wiki', // Usually your repo name. + deploymentBranch: 'pages', + githubHost: 'codeberg.org', onBrokenLinks: 'throw', onBrokenMarkdownLinks: 'warn', diff --git a/src/pages/index.js b/src/pages/index.js index affcd90..dbee367 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -17,7 +17,7 @@ function HomepageHeader() {
+ to="/guide/intro"> Docusaurus Tutorial - 5min ⏱️