Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI workflow to deploy to GitHub Pages. #102

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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