Skip to content
This repository was archived by the owner on Nov 12, 2025. It is now read-only.

Add shutdown page and simplify build to deploy only index.html #552

Add shutdown page and simplify build to deploy only index.html

Add shutdown page and simplify build to deploy only index.html #552

Workflow file for this run

name: CORD-19 UI
on:
push:
branches: [ master ]
paths-ignore:
- '*.md'
- 'img'
pull_request:
branches: [ master ]
paths-ignore:
- '*.md'
- 'img'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Create a “build” directory and copy index.html
run: |
# fail on any error
set -e
mkdir -p build
cp index.html build/index.html
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: site-artifacts
path: build
check-artifact:
if: github.event_name == 'pull_request'
needs: build
runs-on: ubuntu-latest
steps:
- name: Fetch artifacts
uses: actions/download-artifact@v4
with:
name: site-artifacts
path: ../build
- name: Show artifacts
run: |
set -ex
shopt -s extglob
cd "${GITHUB_WORKSPACE}"
ls -la ../build
find ../build
deploy:
if: github.event_name == 'push'
needs: build
runs-on: ubuntu-latest
env:
DEPLOY_TOKEN: ${{ secrets.CORD_19_DEPLOY }}
steps:
- name: Fetch artifacts
uses: actions/download-artifact@v4
with:
name: site-artifacts
path: ../build
- name: Check out code
uses: actions/checkout@v4
with:
ref: gh-pages
- name: Deploy to gh-pages
run: |
set -ex
shopt -s extglob
cd "${GITHUB_WORKSPACE}"
git config user.name "${GITHUB_ACTOR}"
git config user.email "info@vespa.ai"
rm -rf !("CNAME"|"node_modules")
mv ../build/* .
ls -la
git diff
rm -rf ../build
git add .
git commit --allow-empty -m "Publish to gh-pages branch $(date -Is)"
git remote set-url origin "https://x-access-token:${DEPLOY_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git push origin gh-pages