Skip to content

Commit

Permalink
pass 2
Browse files Browse the repository at this point in the history
  • Loading branch information
jukent committed Mar 20, 2024
1 parent 530be5a commit 5106b7f
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 51 deletions.
33 changes: 19 additions & 14 deletions .github/workflows/nightly-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,28 @@ jobs:
python .github/workflows/get-metrics.py
python .github/workflows/write-metrics-md.py
- uses: actions/upload-artifact@v3
with:
name: repo-w-metrics
path: '.'
- name: Upload zipped repo artifact
uses: actions/upload-artifact@v4
with:
name: repo-w-metrics
path: ./repo.zip

build:
needs: automate-metrics
uses: actions/download-artifact@v3
with:
name: repo-w-metrics
if: ${{ github.repository_owner == 'ProjectPythia' }}
uses: ProjectPythia/cookbook-actions/.github/workflows/build-book.yaml@main
with:
environment_file: 'environment.yml'
environment_name: pythia
path_to_notebooks: 'portal'
build_command: 'make -j4 html'
steps:
upload-artifact: # Assuming this is the step name on line 33 (adjust if different)
uses: actions/upload-artifact@v4
with:
name: repo-w-metrics
path: ./repo.zip
build:
if: ${{ github.repository_owner == 'ProjectPythia' }}
uses: ProjectPythia/cookbook-actions/.github/workflows/build-book.yaml@main
with:
environment_file: 'environment.yml'
environment_name: pythia
path_to_notebooks: 'portal'
build_command: 'make -j4 html'

link-check:
if: ${{ github.repository_owner == 'ProjectPythia' }}
Expand Down
31 changes: 18 additions & 13 deletions .github/workflows/publish-site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,27 @@ jobs:
python .github/workflows/get-metrics.py
python .github/workflows/write-metrics-md.py
- uses: actions/upload-artifact@v3
with:
name: repo-w-metrics
path: '.'
- name: Upload zipped repo artifact
uses: actions/upload-artifact@v4
with:
name: repo-w-metrics
path: ./repo.zip

build:
needs: automate-metrics
uses: actions/download-artifact@v3
with:
name: repo-w-metrics
uses: ProjectPythia/cookbook-actions/.github/workflows/build-book.yaml@main
with:
environment_file: 'environment.yml'
environment_name: pythia
path_to_notebooks: 'portal'
build_command: 'make -j4 html'
steps:
upload-artifact: # Assuming this is the step name on line 33 (adjust if different)
uses: actions/upload-artifact@v4
with:
name: repo-w-metrics
path: ./repo.zip
build:
uses: ProjectPythia/cookbook-actions/.github/workflows/build-book.yaml@main
with:
environment_file: 'environment.yml'
environment_name: pythia
path_to_notebooks: 'portal'
build_command: 'make -j4 html'

deploy:
needs: build
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/trigger-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,11 @@ on:
- completed

jobs:
automate-metrics:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Automate Metrics
env:
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
PRIVATE_KEY_ID: ${{ secrets.PRIVATE_KEY_ID }}
run: |
python -m venv analytics-api
source analytics-api/bin/activate
pip install google-analytics-data cartopy matplotlib
python .github/workflows/get-metrics.py
python .github/workflows/write-metrics-md.py
- uses: actions/upload-artifact@v3
with:
name: repo-w-metrics
path: '.'

find-pull-request:
needs: automate-metrics
uses: ProjectPythia/cookbook-actions/.github/workflows/find-pull-request.yaml@main
deploy-preview:
needs: find-pull-request
if: github.event.workflow_run.conclusion == 'success'
uses: actions/download-artifact@v3
with:
name: repo-w-metrics
uses: ProjectPythia/cookbook-actions/.github/workflows/deploy-book.yaml@main
with:
artifact_name: book-zip-${{ needs.find-pull-request.outputs.number }}
Expand Down

0 comments on commit 5106b7f

Please sign in to comment.