Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
palewire committed Jan 7, 2024
1 parent fdb5032 commit 81414d4
Show file tree
Hide file tree
Showing 11 changed files with 116 additions and 410 deletions.
51 changes: 23 additions & 28 deletions .github/workflows/continuous-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install pipenv
run: pipx install pipenv

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.11'
cache: 'pipenv'

- name: Install pipenv
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python

- id: pipenv-install
name: Install Python dependencies
run: pipenv install --dev --python `which python`
run: pipenv sync --dev

- id: run
name: Run
Expand All @@ -30,21 +30,21 @@ jobs:
test-python:
strategy:
matrix:
python: ['3.8', '3.9', '3.10']
python: ['3.9', '3.10', '3.11]
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install pipenv
run: pipx install pipenv

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: 'pipenv'

- name: Install pipenv
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python

- id: pipenv-install
name: Install Python dependencies
run: pipenv install --skip-lock --dev --python `which python`
Expand All @@ -61,19 +61,19 @@ jobs:
needs: [test-python]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install pipenv
run: pipx install pipenv

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.11'
cache: 'pipenv'

- name: Install pipenv
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python

- id: pipenv-install
name: Install Python dependencies
run: pipenv install --dev --python `which python`
run: pipenv sync --dev

- id: build
name: Build release
Expand All @@ -84,12 +84,11 @@ jobs:
- id: check
name: Check release
run: |
pipenv run twine check dist/*
run: pipenv run twine check dist/*

- id: save
name: Save artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: test-release-${{ github.run_number }}
path: ./dist
Expand All @@ -101,13 +100,9 @@ jobs:
needs: [test-build]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/setup-python@v4
with:
python-version: '3.9'

- id: fetch
name: Fetch artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: test-release-${{ github.run_number }}
path: ./dist
Expand Down
94 changes: 72 additions & 22 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,79 @@
name: "Build documentation"
name: Documentation

on:
push:
pull_request:
workflow_dispatch:

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

jobs:
docs:
name: "Build and deploy"
build:
name: Build
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout
uses: actions/checkout@v4

- id: setup-python
name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pipenv'

- id: install-pipenv
name: Install pipenv
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
shell: bash

- id: install-python-dependencies
name: Install Python dependencies
run: pipenv sync --dev
shell: bash

- id: build-sphinx-documentation
name: Build Sphinx documentation
run: pipenv run make html
shell: bash
working-directory: docs

- id: upload-release-candidate
name: Upload release candidate
uses: actions/upload-artifact@v4
with:
name: release-candidate
path: ./docs/_build/html/

deploy:
name: Deploy
runs-on: ubuntu-latest
needs: build
if: ${{ github.ref_name == 'main' }}
steps:
- uses: actions/checkout@v3

- uses: ammaraskar/sphinx-action@master
with:
docs-folder: "docs/"

- uses: actions/upload-artifact@v3
with:
name: documentation-html
path: docs/_build/html/

- uses: shallwefootball/s3-upload-action@master
with:
aws_key_id: ${{ secrets.PALEWIRE_DOCS_AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.PALEWIRE_DOCS_AWS_SECRET_ACCESS_KEY }}
aws_bucket: ${{ secrets.PALEWIRE_DOCS_AWS_BUCKET }}
source_dir: docs/_build/html/
destination_dir: nws-wwa
- name: Download release candidate
uses: actions/download-artifact@v4
with:
name: release-candidate
path: ./docs/

- id: configure-aws
name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.PALEWIRE_DOCS_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.PALEWIRE_DOCS_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- id: upload-to-s3
name: Upload documentation to Amazon S3
uses: datadesk/delivery-deploy-action@v1
with:
bucket: ${{ secrets.PALEWIRE_DOCS_AWS_BUCKET }}
base-path: nws-wwa/
dir: ./docs/
should-cache: false
use-accelerate-endpoint: false
public: true
23 changes: 13 additions & 10 deletions .github/workflows/scrape.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,20 @@ jobs:
name: Scrape
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4

- name: Install pipenv
run: pipx install pipenv

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.11'
cache: 'pipenv'

- name: Install pipenv
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python

- id: pipenv-install
name: Install Python dependencies
run: pipenv install --dev --python `which python`
run: pipenv sync --dev

- id: package-install
name: Install package
Expand All @@ -45,12 +44,16 @@ jobs:
run: pipenv run nwswwa warnings > data/warnings.json
shell: bash

- name: Datestamp
run: date > data/timestamp.txt
shell: bash

- id: commit
name: Commit results
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "[email protected]"
git config pull.rebase false
git add ./
git add ./data
git commit -m "Scrape" && git push || true
shell: bash
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
### Links
### Other resources

* Docs: [palewi.re/docs/nws-wwa/](https://palewi.re/docs/nws-wwa/)
* Source: [www.spc.noaa.gov/products/wwa/](https://www.spc.noaa.gov/products/wwa/)
* Issues: [github.com/datadesk/nws-wwa/issues](https://github.com/datadesk/nws-wwa/issues)
* Packaging: [pypi.python.org/pypi/nws-wwa](https://pypi.python.org/pypi/nws-wwa)
Expand Down
Loading

0 comments on commit 81414d4

Please sign in to comment.