diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 904b026..01f0e59 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,6 +16,21 @@ concurrency: cancel-in-progress: false jobs: + book: + runs-on: ubuntu-latest + defaults: + run: + working-directory: book + steps: + - uses: actions/checkout@v4 + - name: Install mdbook + run: | + wget "https://github.com/rust-lang/mdBook/releases/download/v0.4.40/mdbook-v0.4.40-x86_64-unknown-linux-gnu.tar.gz" + tar -xzf mdbook-v0.4.40-x86_64-unknown-linux-gnu.tar.gz + - name: Build book + run: mdbook-v0.4.40-x86_64-unknown-linux-gnu/mdbook build + + slides: runs-on: ubuntu-latest defaults: @@ -30,12 +45,25 @@ jobs: run: npm install - name: Build run: npm run build --base /${{github.event.repository.name}}/ *.md + + upload: + needs: + - book + - slides + runs-on: ubuntu-latest + steps: + - name: Move stuff into single folder + run: | + mkdir -p public + mv slides/dist/* public/ + mv book/target/* public/ - name: Setup Pages uses: actions/configure-pages@v4 - name: Upload artifacts uses: actions/upload-pages-artifact@v3 with: - path: slides/dist + path: public/ + deploy: environment: name: github-pages