Skip to content

Commit

Permalink
Merge pull request #40 from LiamMcAllisterGroup/ci_improvements
Browse files Browse the repository at this point in the history
ci: consolidate workflows and add dependabot
  • Loading branch information
natemacfadden committed Mar 4, 2024
2 parents 81bb68f + 305ac0c commit 1266a7e
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 66 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
actions:
patterns:
- "*"
44 changes: 0 additions & 44 deletions .github/workflows/test-build.yml

This file was deleted.

50 changes: 28 additions & 22 deletions .github/workflows/deploy.yml → .github/workflows/website.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,70 @@
name: Deploy to GitHub Pages
name: GitHub Pages

on:
push:
branches:
- main
- website
pull_request:
branches:
- main
- website
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
deploy:
name: Deploy to GitHub Pages
build:
runs-on: ubuntu-latest
steps:
- name: Checkout website branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: website
- name: Checkout main branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: main
path: ./code/
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.11'
cache: 'pip'
- name: Install Python requirements
run: pip install -r requirements.txt
- name: Generate documentation
run: python3 ./docs/documentation/produce_doc.py ./code/cytools/
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Build website
run: npm run build
- name: Setup Pages
id: pages
uses: actions/configure-pages@v2
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
path: ./build

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

0 comments on commit 1266a7e

Please sign in to comment.