Skip to content

Commit

Permalink
update action
Browse files Browse the repository at this point in the history
  • Loading branch information
sjev committed May 1, 2024
1 parent f5a7b77 commit 72accf6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/deploy-mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,20 @@ on:
paths:
- "docs/**"
- "mkdocs.yml"
workflow_dispatch: # This line enables manual triggering from GitHub UI
- ".github/workflows/deploy-mkdocs.yml"

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
env:
IMAGE: ghcr.io/rox-automation/roxbot:latest

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v2j

- name: Log in to the Container registry
uses: docker/login-action@v1
Expand All @@ -28,11 +30,11 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Pull the Docker image
run: docker pull ghcr.io/${{ env.USERNAME }}/${{ env.IMAGE_NAME }}:latest
run: docker pull ${{ env.IMAGE }}

- name: Run MkDocs build
run: |
docker run --rm -v ${{ github.workspace }}/docs:/docs -v ${{ github.workspace }}/site:/site ghcr.io/${{ env.USERNAME }}/${{ env.IMAGE_NAME }}:latest mkdocs build -f /docs/mkdocs.yml -d /site
docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace ${{ env.IMAGE }} mkdocs build -d /site
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
Expand Down

0 comments on commit 72accf6

Please sign in to comment.