Skip to content

Merge pull request #291 from mcorino/develop #80

Merge pull request #291 from mcorino/develop

Merge pull request #291 from mcorino/develop #80

Workflow file for this run

# Simple workflow for deploying static content to GitHub Pages
name: Deploy wxRuby Pages
on:
push:
tags:
- v*
# 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:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
env:
wxGTK_VERSION: 3
WX_EXTRA_PACKAGES: doxygen patchelf
WXWIDGETS_ROOT: ${{ github.workspace }}/ext/wxWidgets
wxUSE_XVFB: 1
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 'ruby'
- name: Setup Ruby gems
run: |
bundle config set --local with documentation
bundle install
- name: checkout wxWidgets
uses: actions/checkout@v4
with:
repository: wxWidgets/wxWidgets
path: ${{ env.WXWIDGETS_ROOT }}
submodules: 'recursive'
- name: Set up build environment
run: |
# Install locales used by our tests to run all the tests instead of
# skipping them.
sudo locale-gen de_DE.utf8 de_CH.utf8 en_US.utf8 fr_FR.utf8 sv_SE.utf8
$WXWIDGETS_ROOT/build/tools/before_install.sh
- name: Display build environment
run: |
echo $PATH
ruby -v
doxygen -v
gcc -v
g++ -v
- name: Remove wxWidgets
run: rm -rf $WXWIDGETS_ROOT
- name: Configure wxRuby3
run: |
bundle exec rake configure[--with-wxwin]
- name: Build wxRuby3
run: |
bundle exec rake build
- name: Generate wxRuby3 docs
run: |
bundle exec rake doc WXRUBY_FULLDOCS=1
- name: Build wxRuby3 HTML docs
run: |
bundle exec yardoc
- name: Upload doc archive
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/upload-artifact@v4
with:
name: wxruby3-html-reference
path: rdoc
overwrite: true
- name: Setup Pages
if: ${{ github.event_name != 'workflow_dispatch' }}
uses: actions/configure-pages@v5
- name: Upload artifact
if: ${{ github.event_name != 'workflow_dispatch' }}
uses: actions/upload-pages-artifact@v3
with:
# Upload Yard output only
path: rdoc
- name: Deploy to GitHub Pages
if: ${{ github.event_name != 'workflow_dispatch' }}
id: deployment
uses: actions/deploy-pages@v4
- name: Archive html references docs
if: ${{ github.event_name != 'workflow_dispatch' }}
run: |
tar \
--dereference --hard-dereference \
--directory "rdoc" \
-czf "$RUNNER_TEMP/wxruby3-html-reference.tar.gz" \
"."
- name: Upload doc archive as release asset
if: ${{ github.event_name != 'workflow_dispatch' }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ runner.temp }}/wxruby3-html-reference.tar.gz
tag: ${{ github.ref }}
overwrite: true