Skip to content

Commit

Permalink
Fix pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanmoreau committed Feb 24, 2024
1 parent 2e95490 commit 5840861
Showing 1 changed file with 29 additions and 5 deletions.
34 changes: 29 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,33 @@ jobs:
- name: Build Docs
run: cd docs && mdbook build

- name: Build github-page.tar.gz
run: tar -czvf github-page.tar.gz -C docs/book . && mkdir -p _site && cp github-page.tar.gz _site/

- name: Fix permissions
run: |
chmod -c -R +rX "_site/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3

deploy-docs:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: docs

permissions:
pages: write
id-token: write

environment:
# environment created automatically by GitHub
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/master' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit 5840861

Please sign in to comment.