Skip to content
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

docs: re-introduce typedoc deploy using netlify/actions github actions #1501

Open
acao opened this issue Apr 15, 2020 · 3 comments
Open

docs: re-introduce typedoc deploy using netlify/actions github actions #1501

acao opened this issue Apr 15, 2020 · 3 comments

Comments

@acao
Copy link
Member

@acao acao commented Apr 15, 2020

we used to publish at our deploy preview/lsp, however I think just publishing on each merge to master is fine for the time being. we were having issues that were slowing down the netlify build. i would like to break out the netlify config into seperate actions using the cli action. the root package.json script is just build-docs

@acao acao added this to the GraphiQL-1.0.0-beta milestone Apr 15, 2020
@acao acao added this to Backlog in 3. Complete LSP Features via automation Apr 15, 2020
@acao acao changed the title Re-introduce typedoc deploy using netlify/actions github actions docs: Rre-introduce typedoc deploy using netlify/actions github actions Apr 15, 2020
@acao acao changed the title docs: Rre-introduce typedoc deploy using netlify/actions github actions docs: re-introduce typedoc deploy using netlify/actions github actions Apr 15, 2020
@daemon1024
Copy link
Contributor

@daemon1024 daemon1024 commented Apr 17, 2020

Hey @acao , I would like to help with this issue

we used to publish at our deploy preview/lsp, however I think just publishing on each merge to master is fine for the time being.

deploy-preview generates a deploy from a pull request or merge request so we are already doing that i guess based on

[context.deploy-preview]

So it is unclear to me , what i need to do, can you explain it further to me?

@acao
Copy link
Member Author

@acao acao commented Apr 17, 2020

awesome! glad to have help with this

yes, previously we were doing this, however we would like to take a new approach now. we don't want to slow down the deploy previews any further, as they were ~8-10m with typedoc, possibly because of configuration issues that have been addressed, but it still adds ~2-3m to the build and breaks CI stability which as we all know is really helpful for highly collaborative projects. now they seem closer to 6m which is better.

as you can see from recent action logs (which should be public, are they?), moving from jenkins to github actions allowed us to parralelize CI tasks better and increase overall speed down to 2 minutes.

we are hoping to move more of this to github actions, as not all of what happens on netlify build for build preview

so, for these things that don't need to be generated on every commit for the deploy-preview, we can use netlify's own action to be able to use netlify cli commands and actions to publish the typedoc using just github actions instead of netlify's own build system (faster). Then, we can add oother things that are or have been a part of deploy preview to parallel actions.

the other advantage is that we can deploy the API docs to a seperate site than the deploy preview, and we will probably create even more sites that are generated by this repo soon.

@daemon1024
Copy link
Contributor

@daemon1024 daemon1024 commented Apr 18, 2020

@acao Got it.

as you can see from recent action logs (which should be public, are they?), moving from jenkins to github actions allowed us to parralelize CI tasks better and increase overall speed down to 2 minutes.

Yup they are public and I can see the build times being 2-3 min.

we are hoping to move more of this to github actions, as not all of what happens on netlify build for build preview

so, for these things that don't need to be generated on every commit for the deploy-preview, we can use netlify's own action to be able to use netlify cli commands and actions to publish the typedoc using just github actions instead of netlify's own build system (faster). Then, we can add oother things that are or have been a part of deploy preview to parallel actions.

I have made a workflow based on my understanding.

name: typedoc deploy to netlify

on: pull_request

jobs:
  deploy:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v1
      - uses: bahmutov/npm-install@v1
      - run: yarn build && yarn build-bundles && yarn build-demo

      - name: Deploy to netlify
        uses: netlify/actions/cli@master
        env:
          NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
          NETLIFY_SITE_ID: ${{ secrets.STAGING_NETLIFY_SITE_ID }}
        with:
          args: deploy --dir=packages/graphiql --prod
          secrets: '["NETLIFY_AUTH_TOKEN", "NETLIFY_SITE_ID"]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.