Skip to content

Commit

Permalink
Merge branch 'main' of jaanli.github:onefact/synthetic-healthcare-data
Browse files Browse the repository at this point in the history
  • Loading branch information
jaanphare committed Apr 6, 2024
2 parents ab04b45 + eafa186 commit fa38852
Showing 1 changed file with 100 additions and 0 deletions.
100 changes: 100 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Deploy
# from https://github.com/observablehq/framework/blob/main/.github/workflows/deploy.yml
on:
workflow_dispatch: {}
push:
branches: [main]

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
id-token: write
packages: read
pages: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
cache-dependency-path: |
yarn.lock
'examples/*/yarn.lock'
- run: yarn --frozen-lockfile
- id: date
run: echo "date=$(TZ=America/Los_Angeles date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- id: cache-data
uses: actions/cache@v4
with:
path: |
docs/.observablehq/cache
examples/*/docs/.observablehq/cache
key: data-${{ hashFiles('docs/data/*', 'examples/*/docs/data/*') }}-${{ steps.date.outputs.date }}
- if: steps.cache-data.outputs.cache-hit == 'true'
run: find docs/.observablehq/cache examples/*/docs/.observablehq/cache -type f -exec touch {} +
- run: yarn build
# - name: Build example "api"
# run: yarn --frozen-lockfile && yarn build
# working-directory: examples/api
# - name: Build example "chess"
# run: yarn --frozen-lockfile && yarn build
# working-directory: examples/chess
# - name: Build example "eia"
# run: yarn --frozen-lockfile && yarn build
# working-directory: examples/eia
# env:
# EIA_KEY: ${{ secrets.EIA_KEY }}
# - name: Build example "google-analytics"
# run: yarn --frozen-lockfile && yarn build
# working-directory: examples/google-analytics
# env:
# GA_PROPERTY_ID: ${{ vars.GA_PROPERTY_ID }}
# GA_CLIENT_EMAIL: ${{ secrets.GA_CLIENT_EMAIL }}
# GA_PRIVATE_KEY: ${{ secrets.GA_PRIVATE_KEY }}
# - name: Build example "hello-world"
# run: yarn --frozen-lockfile && yarn build
# working-directory: examples/hello-world
# - name: Build example "mortgage-rates"
# run: yarn --frozen-lockfile && yarn build
# working-directory: examples/mortgage-rates
# - name: Build example "penguin-classification"
# run: |
# python -m pip install --upgrade pip
# pip install -r requirements.txt
# yarn --frozen-lockfile && yarn build
# working-directory: examples/penguin-classification
# - name: Build example "plot"
# run: yarn --frozen-lockfile && yarn build
# working-directory: examples/plot
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - run: mkdir dist/examples && for i in examples/*; do if [ -d $i/dist ]; then mv -v $i/dist dist/examples/$(basename $i); fi; done

# Optional: Add any other steps required to build your project here
# This might include building examples, preprocessing data, etc.

- name: Upload build artifact for GitHub Pages
uses: actions/upload-pages-artifact@v1
with:
path: dist
# Specify the path to your build directory

- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v1
if: github.ref == 'refs/heads/main'
# - uses: cloudflare/pages-action@1
# with:
# apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
# accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
# projectName: framework
# directory: dist
# gitHubToken: ${{ secrets.GITHUB_TOKEN }}
# TODO: This doesn't include the examples. How can we fix that?
# TODO: Re-enable deploy to Observable
# - name: Deploy to Observable
# run: yarn deploy -m "$(git log -1 --pretty=%s)"
# env:
# OBSERVABLE_TOKEN: ${{ secrets.OBSERVABLE_API_TOKEN }}

0 comments on commit fa38852

Please sign in to comment.