Skip to content

Commit

Permalink
update docs.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jackaraz committed Jul 13, 2023
1 parent cca700f commit e952e07
Showing 1 changed file with 48 additions and 8 deletions.
56 changes: 48 additions & 8 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
name: Build Documentation

on:
# pull_request:
# branches: [ "main" ]
# push:
# branches: ["main"]
pull_request:
branches: [ "main" ]
push:
branches: ["main"]
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -32,9 +44,37 @@ jobs:
- name: Compile Docs
run: |
cd docs; make clean; make html; cd ..
- name: Fix permissions if needed
run: |
chmod -c -R +rX "docs/_build/html/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
publish_dir: ./docs/_build/html/
github_token: ${{ secrets.GITHUB_TOKEN }}
path: 'docs/_build/html'

deploy:
name: Deploy docs to GitHub Pages
needs: build
# Set permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest

steps:
- name: Setup Pages
uses: actions/configure-pages@v3

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit e952e07

Please sign in to comment.