open-webui / docs

https://docs.openwebui.com
https://docs.openwebui.com
154 stars 149 forks source link

feat: add contributing tutorial and gh-pages workflow #256

Closed matthewhand closed 3 weeks ago

matthewhand commented 3 weeks ago

Pull Request Title:

Add Contributing Guidelines and Update GitHub Pages Workflow with Environment Variables


Description:

This pull request introduces two contributions:

  1. Contributing Guidelines:

    • Adds a new file at docs/tutorials/tips/contributing-tutorial.md.
    • This document provides guidance for contributing code, reporting issues, improving documentation, and engaging with the community.
  2. GitHub Pages Workflow Update:

    • Modifies the .github/workflows/gh-pages.yml to support forked repositories by introducing two new environment variables:
      • SITE_URL: Defines the custom site URL used for GitHub Pages deployment.
      • BASE_URL: Configures the base path for deployments.
    • These variables ensure forked repositories can use custom URLs for deployments without conflicts.

Files Added/Modified:


Steps to Validate:

  1. Review the Contributing Tutorial:

    • Confirm the content in docs/tutorials/tips/contributing-tutorial.md is comprehensive and clear.
    • Ensure it aligns with the project's contribution policies and practices.
  2. Test the GitHub Pages Workflow:

    • Add the SITE_URL and BASE_URL secrets to your forked repository.
    • Push changes to the main branch and confirm the deployment reflects the custom URLs.

Checklist:

tjbck commented 3 weeks ago

Conflicts?

matthewhand commented 3 weeks ago

should be fixed with #261. maybe you can rerun the CI? edit: nowait relates to gh-pages.yml. i will investigate and get back to you.

matthewhand commented 3 weeks ago

seems this file is special, potentially autogenerated when github pages is enabled. and for that reason it seems difficult (impossible?) to cleanly include the differences in this PR.

so I have removed .github/workflows/gh-pages.yml from the PR, leaving just docs/tutorials/tips/contributing-tutorial.md. I would have preferred an atomic commit. but given the special situation, it seems easiest if you just make the update on your end.

edit: ie, pass the envvar to npm like this...

      - name: Build
        env:
          BASE_URL: ${{ vars.BASE_URL }}
          SITE_URL: ${{ vars.SITE_URL }}
        run: npm run build
tjbck commented 3 weeks ago

Cherry-picked changes, Thanks!