diff --git a/.github/workflows/beta_deploy.yml b/.github/workflows/beta_deploy.yml new file mode 100644 index 0000000000..0c9decef88 --- /dev/null +++ b/.github/workflows/beta_deploy.yml @@ -0,0 +1,42 @@ +name: Deploy beta to Netlify + +on: + # Trigger the workflow every time you push to the `main` branch + # Using a different branch name? Replace `main` with your branch’s name + push: + branches: ["2.0"] + # Allows you to run this workflow manually from the Actions tab on GitHub. + workflow_dispatch: + +# Allow this job to clone the repo and create a page deployment +permissions: + contents: read + pages: write + id-token: write + +jobs: + build-deploy: + runs-on: ubuntu-latest + steps: + + - name: Checkout your repository using git + uses: actions/checkout@v4 + + - name: Install, build, and upload your site output + env: + NODE_OPTIONS: "--max_old_space_size=4096" + uses: withastro/action@v2 + + - name: Deploy to Netlify + uses: nwtgck/actions-netlify@v3.0 + with: + publish-dir: './dist' + production-branch: main + github-token: ${{ secrets.GITHUB_TOKEN }} + deploy-message: "Deploy from GitHub Actions" + enable-pull-request-comment: false + enable-commit-comment: false + overwrites-pull-request-comment: false + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} diff --git a/docs/contributing_libraries.md b/docs/contributing_libraries.md index cea1fc4d3c..52b6c41a75 100644 --- a/docs/contributing_libraries.md +++ b/docs/contributing_libraries.md @@ -19,6 +19,6 @@ p5.js welcomes libraries contributed by others! follow our code of conduct. This directory targets beginner users, so we aim to ensure users have a smooth experience getting started with any library linked to. +We add libraries that are open-source, include some documentation and examples, and follow our code of conduct. This directory targets beginner users, so we aim to ensure users have a smooth experience getting started with any library linked to. If you have any questions, feel free to open an issue or create a work-in-progress PR and ask us anything! diff --git a/src/components/Footer/index.astro b/src/components/Footer/index.astro index 3bb5f2b7f2..8cb5d3026b 100644 --- a/src/components/Footer/index.astro +++ b/src/components/Footer/index.astro @@ -26,25 +26,25 @@ const bannerEntry = await getEntry("banner", currentLocale);
diff --git a/src/content/text-detail/en/about.mdx b/src/content/text-detail/en/about.mdx index cbdb377a87..c6fc0afe50 100644 --- a/src/content/text-detail/en/about.mdx +++ b/src/content/text-detail/en/about.mdx @@ -36,6 +36,6 @@ Community values:
-Access Statement -Code of Conduct +Access Statement +Code of Conduct
\ No newline at end of file diff --git a/src/content/text-detail/es/about.mdx b/src/content/text-detail/es/about.mdx index 3aaa0ab140..b818c0683c 100644 --- a/src/content/text-detail/es/about.mdx +++ b/src/content/text-detail/es/about.mdx @@ -29,6 +29,6 @@ Valores de la comunidad:
-Access Statement -Code of Conduct +Access Statement +Code of Conduct
\ No newline at end of file diff --git a/src/content/text-detail/hi/about.mdx b/src/content/text-detail/hi/about.mdx index 30670c29d0..d77d5389c8 100644 --- a/src/content/text-detail/hi/about.mdx +++ b/src/content/text-detail/hi/about.mdx @@ -29,6 +29,6 @@ P5.js समुदाय प्रौद्योगिकी के साथ
-प्रवेश विवरण -आचार संहिता +प्रवेश विवरण +आचार संहिता
\ No newline at end of file diff --git a/src/content/text-detail/ko/about.mdx b/src/content/text-detail/ko/about.mdx index 9067b787c1..a892a1ee40 100644 --- a/src/content/text-detail/ko/about.mdx +++ b/src/content/text-detail/ko/about.mdx @@ -29,6 +29,6 @@ p5.js 커뮤니티는 기술을 통해 예술과 디자인에 관련된 탐구
-접근성 성명서 -행동 강령 +접근성 성명서 +행동 강령
\ No newline at end of file diff --git a/src/content/text-detail/zh-Hans/about.mdx b/src/content/text-detail/zh-Hans/about.mdx index 510a5eb0b6..b9ce49dd12 100644 --- a/src/content/text-detail/zh-Hans/about.mdx +++ b/src/content/text-detail/zh-Hans/about.mdx @@ -29,6 +29,6 @@ p5.js 鼓励通过迭代编码来实现创意表达。我们重视代码开源
-可及性声明 -行为规范 +可及性声明 +行为规范
\ No newline at end of file diff --git a/src/layouts/AboutLayout.astro b/src/layouts/AboutLayout.astro index f097b5e48e..5f98c57f34 100644 --- a/src/layouts/AboutLayout.astro +++ b/src/layouts/AboutLayout.astro @@ -78,7 +78,7 @@ const displayedFeaturedPeople = sortedFeaturedPeople.slice(0, 6); )) } - {t("All People")} diff --git a/src/layouts/HomepageLayout.astro b/src/layouts/HomepageLayout.astro index 14dff6ba3f..2c0e703b7d 100644 --- a/src/layouts/HomepageLayout.astro +++ b/src/layouts/HomepageLayout.astro @@ -41,7 +41,7 @@ setJumpToState(null); class="col-span-2 lg:col-span-3 order-1 grid grid-cols-subgrid content-start" >

{data.referenceHeaderText}

- {t("Reference")} @@ -49,7 +49,7 @@ setJumpToState(null); class="col-span-2 lg:col-span-3 order-2 lg:order-4 grid grid-cols-subgrid content-start" >

{data.examplesHeaderText}

- {t("Examples")} @@ -64,7 +64,7 @@ setJumpToState(null);

{data.communityHeaderText}

- {t("Community")}
@@ -84,7 +84,7 @@ setJumpToState(null);

{t("Donate to p5.js")}

- {t("Donate")}
@@ -92,7 +92,7 @@ setJumpToState(null);

{t("Download p5.js")}

- {t("Download Library")}
diff --git a/src/scripts/parsers/reference.ts b/src/scripts/parsers/reference.ts index d0c4472379..1395782e80 100644 --- a/src/scripts/parsers/reference.ts +++ b/src/scripts/parsers/reference.ts @@ -1,4 +1,4 @@ -import { cloneLibraryRepo, p5RepoUrl, readFile } from "../utils"; +import { cloneLibraryRepo,cleanUpDirectory, p5RepoUrl, readFile } from "../utils"; import fs from "fs/promises"; import { exec, execSync } from "child_process"; import path from "path"; @@ -13,6 +13,10 @@ const localPath = path.join(__dirname, "in", "p5.js"); const localSoundPath = path.join(__dirname, "in", "p5.sound.js"); const yuidocOutputPath = path.join(__dirname, "out") +//Directory to clean after cloning the libraries +const parsersInPath = path.join(__dirname, "in"); +const parsersOutPath = path.join(__dirname, "out"); + /** * Main function to clone the p5.js library and save the YUIDoc output to a file */ @@ -77,6 +81,10 @@ export const parseLibraryReference = ); await serveYuidocOutput('data'); + + //delete the cloned directories + await cleanUpDirectory(parsersInPath ); + await cleanUpDirectory(parsersOutPath ); return combined; }; diff --git a/src/scripts/utils.ts b/src/scripts/utils.ts index 1e022cf017..f6aebd25c0 100644 --- a/src/scripts/utils.ts +++ b/src/scripts/utils.ts @@ -304,3 +304,15 @@ export const rewriteRelativeMdLinks = (markdownText: string): string => { return `[${linkText}](${updatedUrl})`; }); }; +/** + * Deletes the contents of the given directory. + * @param dirPath Path to the directory to clean up. + */ +export const cleanUpDirectory = async (dirPath: string) => { + try { + await fs.rm(dirPath, { recursive: true, force: true }); + console.log(`Cleaned up directory: ${dirPath}`); + } catch (err) { + console.error(`Error cleaning up directory ${dirPath}: ${err}`); + } +};