Skip to content

📖 Publish Docs

📖 Publish Docs #7

name: 📖 Publish Docs
on:
push:
paths:
- src/**
branches: [main]
# Allow manual trigger (workflow_dispatch)
workflow_dispatch:
jobs:
build:
uses: hotosm/gh-workflows/.github/workflows/[email protected]
with:
command: build
output_path: dist
deploy:
needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment origin
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
artifact_name: build