Skip to content

Commit

Permalink
Use Github's deploy-pages action
Browse files Browse the repository at this point in the history
Be more modern and use Github's deploy-pages action, without using the
gh-pages branch. https://github.com/actions/deploy-pages
  • Loading branch information
mslw committed Nov 18, 2023
1 parent c82bc09 commit cbe53be
Showing 1 changed file with 32 additions and 7 deletions.
39 changes: 32 additions & 7 deletions .github/workflows/docbuild.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
name: docs
name: Build and deploy docs

on:
push:
branches:
- main

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- name: Set up Pages
id: pages
uses: actions/configure-pages@v3

- name: Set up Python
uses: actions/setup-python@v4
Expand All @@ -26,8 +40,19 @@ jobs:
gen-doc -d docs src/sfb1451_schema.yaml
mkdocs build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
# Upload the directory created by mkdocs
path: ./site

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@v2

0 comments on commit cbe53be

Please sign in to comment.