From 933bd441831a7a8a2a8add2e2575331d8f43c57f Mon Sep 17 00:00:00 2001 From: "Pablo R. Mier" Date: Wed, 24 Apr 2024 21:10:32 +0200 Subject: [PATCH] Fix deploy action --- .github/workflows/deploy-docs.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 5f111885..1bdeebf4 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -11,12 +11,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Code - uses: actions/checkout@v4 + uses: actions/checkout@v2 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v2 with: - python-version: '3.9' + python-version: '3.11' - name: Install Dependencies run: | @@ -34,9 +34,18 @@ jobs: git config --local user.email "action@github.com" git config --local user.name "GitHub Action" + - name: Set Destination Directory + id: set-dest-dir + run: | + if [ "${{ github.ref }}" = "refs/heads/main" ]; then + echo "::set-output name=dir::" + else + echo "::set-output name=dir::dev" + fi + - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./docs/_build/html - destination_dir: ${{ github.ref == 'refs/heads/main' ? '' : 'dev' }} + destination_dir: ${{ steps.set-dest-dir.outputs.dir }}