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

Migrate from Travis to GitHub Actions #62

Merged
merged 4 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
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
13 changes: 13 additions & 0 deletions .github/actions/initialize/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: 'Initialize'
description: 'Checkout repo and install dependencies'
runs:
using: "composite"
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Upgrade pip
run: python -m pip install --upgrade pip
shell: bash
- name: Install documentation building framework
run: pip install mkdocs
shell: bash
47 changes: 47 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build and Deploy Docs

on:
pull_request:
types:
- closed
branches:
- main
- master

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
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:
deploy:
if: github.event.pull_request.merged == true
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Initialize the environment
uses: ./.github/actions/initialize
with:
documentation: 'true'
- name: Build Docs
run: |
mkdocs build --strict --verbose
touch .site/.nojekyll
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: '.site'
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
19 changes: 19 additions & 0 deletions .github/workflows/repo-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: PR Checks

on:
pull_request:
branches:
- main
- master

jobs:
check-docs:
name: Check docs for warnings
runs-on: ubuntu-latest
steps:
- name: Initialize the environment
continue-on-error: true
uses: ./.github/actions/initialize
- name: Build Docs
continue-on-error: true
run: mkdocs build --strict --verbose
9 changes: 0 additions & 9 deletions CODEOWNERS

This file was deleted.

3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ We have adopted the following style guidelines:

## Deploying docs to Github Pages Site

We're currently using TravisCI to deploy to Github Pages. To update the GH_SECRET_TOKEN environment variable referenced in the `.travis.yml` file, follow the [TravisCI documentation](https://docs.travis-ci.com/user/deployment/pages/). Only master docs can be deployed to the documentation site.
We're currently using GitHub Actions to deploy to Github Pages.
The docs on the master branch are automatically deployed to the documentation site.

## Building the Docs Locally

Expand Down
Loading