From ff97badde9ed24a8383afc14e1c3295db47143f5 Mon Sep 17 00:00:00 2001 From: Jonathan Perret Date: Tue, 30 Jul 2024 12:34:20 +0200 Subject: [PATCH] Auto-deploy version 1.0 alias dev from main --- .github/workflows/deploy.yml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2ba20fc..82788cb 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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" @@ -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 \ No newline at end of file