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

Deploy on CI #53

Closed
mottosso opened this issue Mar 20, 2021 · 1 comment
Closed

Deploy on CI #53

mottosso opened this issue Mar 20, 2021 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@mottosso
Copy link
Owner

@monkeez I've moved CI from Azure to GitHub Actions, since Azure wasn't playing ball anymore. It wasn't providing a good UI on GitHub either, making it hard to spot when and where things went wrong.

The documentation deployment got lost in the transition, and there are a few too many things I don't recognise in the setup. Would you happen to have a moment to see if you can port it over?

  # -----------------------------------------------------------------------
  #
  # Deploy docs
  #
  # -----------------------------------------------------------------------

  - job: Deploy_Docs
    condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
    pool:
      vmImage: "ubuntu-latest"
    steps:
      - task: DownloadPipelineArtifact@2
        inputs:
          artifact: docs
          path: $(Build.SourcesDirectory)/build/html

      - script: |
          git init
          git config --local user.name "Azure Pipelines"
          git config --local user.email "mitchellcoote@gmail.com"
          git add .
          touch .nojekyll
          git add .nojekyll
          git commit -m "Commit generated documentation"
        displayName: "Commit pages"
        workingDirectory: build/html

      - task: InstallSSHKey@0
        inputs:
          knownHostsEntry: $(KNOWN_HOST)
          sshKeySecureFile: deploy_key

      - script: |
          git remote add origin git@github.com:mottosso/cmdx.git
          git push -f origin HEAD:gh-pages
        displayName: "Publish GitHub Pages"
        workingDirectory: build/html

    dependsOn: Maya

I think it's safe to write as a separate "workflow" that only triggers on tags, similar to the PyPI deployment workflow currently in place.

@mottosso mottosso added the documentation Improvements or additions to documentation label Mar 20, 2021
@monkeez
Copy link
Collaborator

monkeez commented Mar 21, 2021

I'll will try find some time to look into it, might be a couple of weeks though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants