Skip to content

Commit

Permalink
Fix deploy action
Browse files Browse the repository at this point in the history
  • Loading branch information
pablormier committed Apr 24, 2024
1 parent 00dac30 commit 933bd44
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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 }}

0 comments on commit 933bd44

Please sign in to comment.