Merge pull request #268 from ptabor/se-2024-10-13-6836-pl_kabaret_jag… #227
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple workflow for deploying static content to GitHub Pages | |
name: Deploy static content to Pages | |
on: | |
# Runs on pushes targeting the default branch | |
push: | |
branches: ["main"] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: write # If generate workload would not perform a 'release' by default, the read permission would be sufficient. | |
pages: write | |
packages: read | |
id-token: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
generate: | |
uses: ./.github/workflows/generate_all.yml | |
with: | |
html: true | |
epub: true | |
pdf: true | |
release: false | |
# Single deploy job since we're just deploying | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: generate | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Download generated songbook artifacts (pdfs) | |
uses: actions/download-artifact@v4 | |
with: | |
name: songbooks_pdfs | |
path: _generated | |
- name: Download generated songbook artifacts (epub) | |
uses: actions/download-artifact@v4 | |
with: | |
name: songbooks_epub | |
path: _generated | |
- name: Download generated songbook artifacts (htmls) | |
uses: actions/download-artifact@v4 | |
with: | |
name: songbooks_htmls | |
path: _generated | |
- name: Prepare _site | |
run: | | |
mkdir -p _site/songs_html _site/songs_tex | |
unzip -o _generated/*.zip -d _site | |
mv _generated/index.xhtml _site/index.xhtml | |
mv _generated/*.pdf _site/songs_tex | |
mv _generated/*.epub _site/ | |
cp -R editor _site/ | |
ls -la _site/ | |
- name: Upload artifact for pages | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
# Upload entire repository | |
path: '_site' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |