skip unknown jobs #204
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Deploy dashboard | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
schedule: | |
- cron: '0 8 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 300 | |
permissions: | |
contents: 'write' | |
id-token: 'write' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: create service-secrets.json | |
run: | | |
echo "$SERVICE_SECRETS" > service-secrets.json | |
env: | |
SERVICE_SECRETS: ${{ secrets.SERVICE_SECRETS }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e . -c requirements.txt | |
pip install traceback-with-variables | |
- name: Build the dashboard | |
run: | | |
traceback-with-variables napari_dashboard.get_webpage.gdrive | |
env: | |
PEPY_KEY: ${{ secrets.PEPY_KEY }} | |
GH_TOKEN_: ${{ secrets.GITHUB_TOKEN }} | |
# I'm using GH_TOKEN_ because using GITHUB_TOKEN during development crash gh app | |
- name: Deploy Dashboard | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./webpage | |
publish_branch: gh_pages | |
exclude_assets: 'napari_dashboard.xlsx' | |
- name: Send a stream message | |
uses: zulip/github-actions-zulip/send-message@v1 | |
with: | |
api-key: ${{ secrets.ZULIP_API_KEY }} | |
email: "[email protected]" | |
organization-url: "https://napari.zulipchat.com" | |
to: "metrics and analytics" | |
type: "stream" | |
topic: "Deploy dashboard" | |
content: "Dashboard deployed successfully" | |
- name: Send a stream message | |
uses: zulip/github-actions-zulip/send-message@v1 | |
if: ${{ failure() }} | |
with: | |
api-key: ${{ secrets.ZULIP_API_KEY }} | |
email: "[email protected]" | |
organization-url: "https://napari.zulipchat.com" | |
to: "metrics and analytics" | |
type: "stream" | |
topic: "Deploy dashboard" | |
content: "Dashboard deployment failed" |