Merge pull request #564 from scarpe-team/schwad_url_2 #179
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
# Based on https://raw.githubusercontent.com/actions/starter-workflows/main/pages/jekyll.yml | |
name: Deploy YARD documentation 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 | |
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 job | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: sudo apt-get update && sudo apt-get -y install portaudio19-dev libgtk-3-dev libwebkit2gtk-4.0-dev | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0 | |
with: | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
cache-version: 0 # Increment this number if you need to re-download cached gems | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@v5 | |
- name: Build with yardoc | |
run: rm -rf .yardoc doc && bundle exec yardoc -o doc | |
env: | |
FAKE_ENV: example | |
- name: Push yardoc files to pages branch | |
run: | | |
set -e | |
set -x | |
git switch --orphan new_pages | |
find . -mindepth 1 -maxdepth 1 ! \( -name "doc" -o -name ".git" \) -exec rm -rf {} ';' | |
mv doc/* . | |
touch .nojekyll | |
rmdir doc | |
git add . | |
git config user.email "[email protected]" | |
git config user.name "Docs Builder" | |
git commit -m "New docs build" | |
git checkout -b pages || git checkout pages | |
git reset --hard new_pages | |
git push -f origin pages | |