Skip to content

Commit

Permalink
Merge pull request #362 from scarpe-team/ghactions_pages_branch
Browse files Browse the repository at this point in the history
Docs-build workflow that doesn't use new GitHub Actions deployment
  • Loading branch information
Schwad authored Aug 18, 2023
2 parents defba77 + 0532a4e commit 599a3fb
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
contents: write
pages: write
id-token: write

Expand All @@ -30,7 +30,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt-get -y install portaudio19-dev libgtk-3-dev libwebkit2gtk-4.0-dev
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:
Expand All @@ -43,21 +43,20 @@ jobs:
run: rm -rf .yardoc doc && bundle exec yardoc -o doc
env:
FAKE_ENV: example
- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v1
with:
path: ./doc

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
- 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 "builder@example.com"
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

0 comments on commit 599a3fb

Please sign in to comment.