Skip to content

Commit

Permalink
Bumped version info for github workflow
Browse files Browse the repository at this point in the history
- Previous workflow used outdated packages and versions
- In GitHub actions bump python & github action versions to newer
  ones
- Added write permissions in order to enable direct gh-pages upload
  • Loading branch information
Songtech-0912 committed Dec 30, 2024
1 parent 8752ce2 commit 519d6a2
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,20 @@ on:
- main
- test-gh-actions # GH actions test branch

permissions:
id-token: write
pages: write

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: 3.10.15
- name: Install Python dependencies
run: |
sudo apt-get install python3-pip
Expand All @@ -33,13 +37,13 @@ jobs:
jupyter-book build ./book
- name: Push built book HTML as artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
path: "book/_build/html"

- name: Deploy book HTML to Github Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4

- name: Build PDF of book
run: |
Expand All @@ -62,4 +66,4 @@ jobs:
--tag_name v0.0.0-$(git rev-parse HEAD | cut -c 1-8) \
--prerelease \
--body_string "Automatically generated from book sources via Github Actions" \
book/_build/elara-handbook.pdf
book/_build/elara-handbook.pdf

0 comments on commit 519d6a2

Please sign in to comment.