Skip to content

update action

update action #2

Workflow file for this run

name: Deploy MkDocs Site
on:
push:
branches:
- main # Trigger the workflow on push to main branch
paths:
- "docs/**"
- "mkdocs.yml"
- ".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@v2j
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pull the Docker image
run: docker pull ${{ env.IMAGE }}
- name: Run MkDocs build
run: |
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
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site