# Confused about how to deploy versions of documentation

**URL:** https://discourse.julialang.org/t/confused-about-how-to-deploy-versions-of-documentation/67031
**Category:** General Usage
**Tags:** question, documenter, tagbot
**Created:** [August 26, 2021, 11:37am UTC](https://discourse.julialang.org/t/confused-about-how-to-deploy-versions-of-documentation/67031 "2021-08-26T11:37:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![plafer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/plafer/32/27665_2.png) [@plafer](https://discourse.julialang.org/u/plafer)
#### Post date: [August 26, 2021, 11:37am UTC](https://discourse.julialang.org/t/confused-about-how-to-deploy-versions-of-documentation/67031/1 "2021-08-26T11:37:33Z")

</div>

I am confused as to how to deploy my package’s documentation per version. I use Github Actions, and followed the docs for tagbot and documenter.jl, but something still escapes me.

Here is my Tagbot config:

```markdown
name: TagBot
on:
  issue_comment:
    types:
      - created
  workflow_dispatch:
jobs:
  TagBot:
    if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
    runs-on: ubuntu-latest
    steps:
      - uses: JuliaRegistries/TagBot@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          ssh: ${{ secrets.SSH_KEY }}

```

Note that I am using `secrets.SSH_KEY` based on [this section](https://github.com/marketplace/actions/julia-tagbot#ssh-deploy-keys) in TagBot’s docs.

Here is my `.github/workflows/Documentation.yml` file (unmodified from the [docs](https://juliadocs.github.io/Documenter.jl/stable/man/hosting/#GitHub-Actions)):

```markdown
on:
  push:
    branches:
      - master
    tags: '*'
  pull_request:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: julia-actions/setup-julia@latest
        with:
          version: '1.6'
      - name: Install dependencies
        run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
      - name: Build and deploy
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token
          DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key
        run: julia --project=docs/ docs/make.jl

```

I am also unsure how to set up the environment properly to call `deploydocs()` locally. The docs for `deploydocs` mention:

> [`deploydocs`](https://juliadocs.github.io/Documenter.jl/stable/lib/public/#Documenter.deploydocs) will automatically figure out whether it is deploying the documentation for a tagged release or just a development branch (usually, based on the environment variables set by the CI system).

I wasn’t able to find how to set up that environment myself locally; the [Deployment Systems](https://juliadocs.github.io/Documenter.jl/stable/man/hosting/#Deployment-systems) section talks about the different CIs but not local deployment, or how to specify information about which version to deploy.

Any help is greatly appreciated!

---

<div class="post-metadata">

### Author: ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)
#### Post date: [August 27, 2021, 12:49am UTC](https://discourse.julialang.org/t/confused-about-how-to-deploy-versions-of-documentation/67031/2 "2021-08-27T00:49:52Z")

</div>

I always struggle with that, so I wrote a step by step: [Publish Docs · JuliaNotes.jl](https://m3g.github.io/JuliaNotes.jl/stable/publish_docs/)

(But to be honest I think the last time I tried that it still failed somewhere, but I managed to get it working somehow)

---

<div class="post-metadata">

### Author: ![plafer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/plafer/32/27665_2.png) [@plafer](https://discourse.julialang.org/u/plafer)
#### Post date: [August 31, 2021, 12:35am UTC](https://discourse.julialang.org/t/confused-about-how-to-deploy-versions-of-documentation/67031/3 "2021-08-31T00:35:54Z")

</div>

Your article made me realize that I never created the `DOCUMENTER_KEY` deploy key/secret.

Thank you!
