-
Notifications
You must be signed in to change notification settings - Fork 258
Set up Formideploy for Docusarus site #348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| name: Deploy Docs Site | ||
|
|
||
| on: | ||
| push: | ||
| paths: | ||
| - 'docs/**' | ||
| - 'website/**' | ||
| pull_request: | ||
| branches: | ||
| - 'master' | ||
| paths: | ||
| - 'docs/**' | ||
| - 'website/**' | ||
|
|
||
| jobs: | ||
| deploy-website: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: 16 | ||
| cache: 'yarn' | ||
|
|
||
| - name: AWS CLI version | ||
| run: "aws --version" | ||
|
|
||
| - name: Install Dependencies | ||
| run: yarn install --frozen-lockfile | ||
| working-directory: ./website | ||
|
|
||
| - name: Build the website | ||
| run: yarn build | ||
| working-directory: ./website | ||
|
|
||
| # Use `gh` tool to infer more information about the pull request. | ||
| # The underlying issue here is pushes to a non-mergeable/master 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 (production) | ||
| if: github.ref == 'refs/heads/master' | ||
| run: yarn deploy:prod | ||
| working-directory: ./website | ||
| env: | ||
| GITHUB_DEPLOYMENT_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| module.exports = { | ||
| lander: { | ||
| name: "react-live", | ||
| }, | ||
| build: { | ||
| // Build output directory. | ||
| // Docusaurus defaults to `build`. | ||
| // We use `docusaurus build --out-dir build/open-source/docusaurus` to build intermediate real dirs. | ||
| dir: "build", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think in package.json, for the build script, you'll want to update the output dir. And then also check the baseUrl in docusaurus config to make sure it matches. Groqd should have an example of those two things (reviewing from mobile right now)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for catching that. Yeah, the paths were off. I believe I pushed the correct URLs now that mirror our configuration for |
||
| }, | ||
| }; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just adding Typescript-based sample code to our docs.