Skip to content

change for summer 2024 (#622) #1463

change for summer 2024 (#622)

change for summer 2024 (#622) #1463

Workflow file for this run

name: Test Sphinx Build Deploy
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install Dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
SETUPTOOLS_ENABLE_FEATURES="legacy-editable" python -m pip install --editable .
- name: Verify Format
run: |
validate
- name: Unit Test Sample Code
run: |
python -m unittest
sphinx:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install Dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
SETUPTOOLS_ENABLE_FEATURES="legacy-editable" python -m pip install --editable .
- name: Sphinx Build
run: |
site
- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
name: website
path: out/
deploy:
needs:
- test
- sphinx
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.repository == 'jameshughes89/cs101'
concurrency: deploying
steps:
- name: Create Site Directory
run: mkdir out
- name: Download Build Artifact
uses: actions/download-artifact@v4
with:
name: website
path: out
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Copy Files to the Website
run: |
aws s3 sync ./out s3://modsurski.com/csci161 --delete