diff --git a/.github/auto_assign.yml b/.github/auto_assign.yml new file mode 100644 index 00000000..80ebfb46 --- /dev/null +++ b/.github/auto_assign.yml @@ -0,0 +1,26 @@ +# Set to true to add reviewers to pull requests +addReviewers: true + +# Set to true to add assignees to pull requests +addAssignees: author + +# A list of reviewers to be added to pull requests (GitHub user name) +reviewers: + - saseungmin + +# A number of reviewers added to the pull request +# Set 0 to add all the reviewers (default: 0) +numberOfReviewers: 0 + +# A list of assignees, overrides reviewers if set +# assignees: +# - assigneeA + +# A number of assignees to add to the pull request +# Set to 0 to add all of the assignees. +# Uses numberOfReviewers if unset. +# numberOfAssignees: 2 + +# A list of keywords to be skipped the process that add reviewers if pull requests include it +# skipKeywords: +# - wip diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..84cc3f0a --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,40 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: + - main + # Review gh actions docs if you want to further define triggers, paths, etc + # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on + +jobs: + deploy: + name: Deploy to GitHub Pages + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + cache: yarn + + - name: Install dependencies + run: yarn install --immutable + - name: Build website + run: yarn docs:build + + # Popular action to deploy to GitHub Pages: + # Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + # Build output to publish to the `gh-pages` branch: + publish_dir: ./apps/docs/build + # The following lines assign commit authorship to the official + # GH-Actions bot for deploys to `gh-pages` branch: + # https://github.com/actions/checkout/issues/13#issuecomment-724415212 + # The GH actions bot is used by default if you didn't specify the two fields. + # You can swap them out with your own user credentials. + user_name: github-actions[bot] + user_email: 41898282+github-actions[bot]@users.noreply.github.com diff --git a/.github/workflows/test-deploy.yml b/.github/workflows/test-deploy.yml new file mode 100644 index 00000000..ad933913 --- /dev/null +++ b/.github/workflows/test-deploy.yml @@ -0,0 +1,22 @@ +name: Test deployment + +on: + pull_request: + branches: + - main + +jobs: + test-deploy: + name: Test deployment + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + cache: yarn + + - name: Install dependencies + run: yarn install --immutable + - name: Test build website + run: yarn docs:build diff --git a/apps/docs/docusaurus.config.js b/apps/docs/docusaurus.config.js index fcd2ac2d..0173d9fb 100644 --- a/apps/docs/docusaurus.config.js +++ b/apps/docs/docusaurus.config.js @@ -9,29 +9,20 @@ const config = { title: 'My Site', tagline: 'Dinosaurs are cool', favicon: 'img/favicon.ico', - - // Set the production url of your site here - url: 'https://your-docusaurus-test-site.com', - // Set the // pathname under which your site is served - // For GitHub pages deployment, it is often '//' - baseUrl: '/', + url: 'https://mbti-nf-team.github.io', + baseUrl: '/frontend-libraries/', // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. - organizationName: 'facebook', // Usually your GitHub org/user name. - projectName: 'docusaurus', // Usually your repo name. - + organizationName: 'mbti-nf-team', // Usually your GitHub org/user name. + projectName: 'frontend-libraries', // Usually your repo name. onBrokenLinks: 'throw', onBrokenMarkdownLinks: 'warn', - - // Even if you don't use internalization, you can use this field to set useful - // metadata like html lang. For example, if your site is Chinese, you may want - // to replace "en" with "zh-Hans". + trailingSlash: false, i18n: { - defaultLocale: 'en', - locales: ['en'], + defaultLocale: 'ko', + locales: ['ko'], }, - presets: [ [ 'classic', diff --git a/package.json b/package.json index 9ac3bda7..00dd09fd 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,9 @@ "publish-packages": "turbo run build lint && changeset version && changeset publish", "build": "turbo run build", "dev": "turbo run dev", - "lint": "turbo run lint" + "lint": "turbo run lint", + "docs": "yarn workspace docs", + "docs:build": "yarn run docs build" }, "dependencies": { "@changesets/cli": "^2.26.2"