Skip to content

frontend: Add feature to select/deselect all jobs #51

frontend: Add feature to select/deselect all jobs

frontend: Add feature to select/deselect all jobs #51

name: Build and deploy statuspage
on:
push:
branches: [ prod ]
jobs:
build-statuspage:
runs-on: ubuntu-latest
if: github.repository == 'pschlan/cron-job.org'
environment:
name: statuspage-prod
url: https://status.cron-job.org
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: ./statuspage/package-lock.json
- run: 'echo "$STATUSPAGE_CONFIG" > ./src/utils/Config.js'
shell: bash
env:
STATUSPAGE_CONFIG: ${{secrets.STATUSPAGE_CONFIG}}
working-directory: ./statuspage
- run: npm ci
working-directory: ./statuspage
- run: npm run build
working-directory: ./statuspage
- name: Deploy via SSH
run: |
mkdir -p ~/.ssh
chmod 0700 ~/.ssh
touch ~/.ssh/id_rsa_statuspage
chmod 0600 ~/.ssh/id_rsa_statuspage
echo "$STATUSPAGE_SSH_KEY" > ~/.ssh/id_rsa_statuspage
rsync -avz --delete -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ~/.ssh/id_rsa_statuspage" --exclude "*.map" ./build/ $STATUSPAGE_DEST
rm ~/.ssh/id_rsa_statuspage
working-directory: ./statuspage
env:
STATUSPAGE_SSH_KEY: ${{secrets.STATUSPAGE_SSH_KEY}}
STATUSPAGE_DEST: ${{secrets.STATUSPAGE_DEST}}