forked from cadence/out-of-your-element
49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
# Copied from: https://github.com/actions/starter-workflows/blob/e3c451d60f119b71caebf13c98ac45da6e15b4b7/pages/jekyll.yml#L4
|
|
name: Publish MkDocs to Pages
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: "pages"
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build:
|
|
# Specify runner, build static files as an artifact
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v1
|
|
with:
|
|
ref: main
|
|
|
|
- name: Build static files
|
|
id: build
|
|
run: |
|
|
pip install mkdocs-material
|
|
mkdocs build
|
|
|
|
- name: Upload static files as artifact
|
|
id: deployment
|
|
uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: site/
|
|
|
|
# Deploy built files
|
|
deploy:
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|