victory
victory copied to clipboard
[Docs] New website
Description
- As part of Formidable's ongoing commitment to Open Source, we are starting to standardize our OSS Landers around docusaurus.
- This PR replaces the existing
react-static
site with a new one backed bydocusaurus
. - Markdown content is kept separately at
/docs
and all docusaurus-related code is located in the new/website
folder. - This is largely based on prior work done for react-native-owl and spectacle
note that Because Reasons™️ this isn't currently building and won't be available as a deploy preview until we have fixed up those issues.
in the meantime if you want to check it out this will at least run locally; but some links will be broken.
![Screen Shot 2022-06-01 at 7 20 30 PM](https://user-images.githubusercontent.com/2393035/171535951-c20554a1-343b-475e-991e-39d245ffd45f.png)
@jpdriver I pushed up a feature branch for this docs effort so it's easier for multiple people to contribute before we release the new docs. Once the initial work gets in, I'm thinking about going in and updating some of the examples to use more modern React syntax and remove dependencies on lodash, etc.
@jpdriver -- I believe this is the current best "fix" I have for the deploy thing. There's apparently a lot of complexity in how commits attach to PRs in GH.
# Use `gh` tool to infer more information about the pull request.
# The underlying issue here is pushes to a non-mergeable/main target branch
# don't have the PR number easily available.
# https://stackoverflow.com/a/70102700
- name: Get pull request info
id: pr_info
run: echo "::set-output name=pull_request_number::$(gh pr view --json number -q .number || echo "")"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy docs (staging)
if: github.ref != 'refs/heads/main'
run: yarn deploy:stage
working-directory: ./website
env:
# GH actions have a PR merge commit that _isn't_ our actual commits.
# Manually infer correct branch and sha for pull requests.
FORMIDEPLOY_GIT_SHA: ${{ github.event.pull_request.head.sha }}
FORMIDEPLOY_PULL_REQUEST: ${{ steps.pr_info.outputs.pull_request_number }}
GITHUB_DEPLOYMENT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}