From ebfe05cce42ba86f50f83270fed5a206d7d73512 Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Tue, 13 Feb 2024 02:44:30 +0800 Subject: [PATCH] add gh-pages --- .github/workflows/deploy-docusaurus.yml | 35 +++++++++++++++++++ QPod/docs/tutorial-basics/congratulations.md | 4 +-- QPod/docs/tutorial-basics/deploy-your-site.md | 31 ---------------- 3 files changed, 36 insertions(+), 34 deletions(-) create mode 100644 .github/workflows/deploy-docusaurus.yml delete mode 100644 QPod/docs/tutorial-basics/deploy-your-site.md diff --git a/.github/workflows/deploy-docusaurus.yml b/.github/workflows/deploy-docusaurus.yml new file mode 100644 index 0000000..674d9a8 --- /dev/null +++ b/.github/workflows/deploy-docusaurus.yml @@ -0,0 +1,35 @@ +name: Deploy Docusaurus Site + +on: + push: + branches: + - main # default branch + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '21' + + - name: Install Dependencies and Build + run: | + cd QPod + npm install + npm run build + + - name: Setup Pages + uses: actions/configure-pages@v3 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: # 👇 Specify build output path + path: QPod/build + + - name: Deploy to GitHub Pages + uses: actions/deploy-pages@v2 + id: deployment diff --git a/QPod/docs/tutorial-basics/congratulations.md b/QPod/docs/tutorial-basics/congratulations.md index 04771a0..e85f92d 100644 --- a/QPod/docs/tutorial-basics/congratulations.md +++ b/QPod/docs/tutorial-basics/congratulations.md @@ -1,5 +1,5 @@ --- -sidebar_position: 6 +sidebar_position: 5 --- # Congratulations! @@ -8,8 +8,6 @@ You have just learned the **basics of Docusaurus** and made some changes to the Docusaurus has **much more to offer**! -Have **5 more minutes**? Take a look at **[versioning](../tutorial-extras/manage-docs-versions.md)** and **[i18n](../tutorial-extras/translate-your-site.md)**. - Anything **unclear** or **buggy** in this tutorial? [Please report it!](https://github.com/facebook/docusaurus/discussions/4610) ## What's next? diff --git a/QPod/docs/tutorial-basics/deploy-your-site.md b/QPod/docs/tutorial-basics/deploy-your-site.md deleted file mode 100644 index 1c50ee0..0000000 --- a/QPod/docs/tutorial-basics/deploy-your-site.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -sidebar_position: 5 ---- - -# Deploy your site - -Docusaurus is a **static-site-generator** (also called **[Jamstack](https://jamstack.org/)**). - -It builds your site as simple **static HTML, JavaScript and CSS files**. - -## Build your site - -Build your site **for production**: - -```bash -npm run build -``` - -The static files are generated in the `build` folder. - -## Deploy your site - -Test your production build locally: - -```bash -npm run serve -``` - -The `build` folder is now served at [http://localhost:3000/](http://localhost:3000/). - -You can now deploy the `build` folder **almost anywhere** easily, **for free** or very small cost (read the **[Deployment Guide](https://docusaurus.io/docs/deployment)**).