Update dependency http-proxy-middleware to v3.0.3 - autoclosed #490
Workflow file for this run
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: 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: Use Node.js 16 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '16.x' | |
- name: Build code | |
run: | | |
set -ex | |
shopt -s extglob | |
cd "${GITHUB_WORKSPACE}" | |
ls -la | |
yarn install | |
yarn build | |
- 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 "[email protected]" | |
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 |