Skip to content

Commit

Permalink
Update CI workflow to deploy to GitHub Pages.
Browse files Browse the repository at this point in the history
Since the current colcon maintainers do not have administrative access
to colcon.readthedocs.org this is an additional deployment configuration
that can target eventually target colcon.github.io

* Updates the CI build to run on pull requests.
* Adds upload and deploy jobs which use the build results.
  • Loading branch information
nuclearsandwich committed Aug 16, 2024
1 parent fa2d559 commit fb7e7ed
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: colcon.readthedocs.org

on: [push]
on:
push:
branches: ['main']
pull_request:

jobs:
build:
Expand Down Expand Up @@ -36,3 +39,29 @@ jobs:
if [[ -s "_build/spelling/index.spelling" ]]; then cat "_build/spelling/index.spelling"; fi
if [[ -s "_build/warnings_and_errors.log" ]]; then false; fi
if [[ -s "_build/spelling/index.spelling" ]]; then false; fi
upload:
if: ${{ github.event_name == "push" }}
needs: build
runs-on: ubuntu-22.04
steps:
- name: Upload build for GitHub Pages
uses: actions/upload-pages-artifact@v3
with:
path: _build/html

deploy:
permissions:
contents: read
id-token: write
pages: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
if: ${{ github.event_name == "push" }}
needs: upload
runs-on: ubuntu-22.04
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit fb7e7ed

Please sign in to comment.