Files
Huntarr/.github/workflows/deploy-docs.yml

51 lines
1.2 KiB
YAML

name: Deploy Docs
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Build docs
run: |
# Create .nojekyll file
touch docs/.nojekyll
# Force using upload-artifact@v4 for all artifact operations
- name: Setup Dependencies
run: |
echo "Using upload-artifact@v4 explicitly"
echo "ACTIONS_RUNTIME_URL=https://pipelines.actions.githubusercontent.com/${{ github.run_id}}" >> $GITHUB_ENV
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./docs
# Make sure we use v4 internally
artifact_name: github-pages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2