Skip to content

Commit

Permalink
Auto-deploy version 1.0 alias dev from main
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanperret authored and dl1com committed Jul 30, 2024
1 parent 45200f3 commit ff97bad
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@ name: Deploy
on:
# Triggers the workflow on push events but only for the "master" branch
push:
branches: [ "master" ]
branches: [ "main" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
version:
description: 'Which Version of Docs to Deploy'
description: 'Which version of docs to deploy, including space-separated tags (e.g. "0.95 latest", "1.0 dev")'
required: true
default: '0.95'
default: '1.0 dev'
type: string
options:
- '0.95'

env:
DEFAULT_VERSION: 0.95
DEFAULT_VERSION: '1.0 dev'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "deploy"
Expand All @@ -38,12 +37,6 @@ jobs:

# Runs a set of commands using the runners shell
- name: Run Mike
if: inputs.version
run: |
pip install -r requirements.txt
mike deploy ${{ inputs.version }} latest -u -p
- name: Run Mike Update
if: inputs.version == ''
run: |
pip install -r requirements.txt
mike deploy $DEFAULT_VERSION latest -u -p
mike deploy ${{ inputs.version || env.DEFAULT_VERSION }} -u -p

0 comments on commit ff97bad

Please sign in to comment.