Skip to content

Deploy

Deploy #381

Workflow file for this run

name: Deploy
on:
workflow_dispatch:
push:
branches:
- master
repository_dispatch:
schedule:
- cron: '0 0 1 * *'
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16'
- run: yarn install
- run: yarn kv-gc
- run: yarn build
#- name: Publish
#uses: cloudflare/[email protected]
#with:
#apiToken: ${{ secrets.CF_API_TOKEN }}
#preCommands: |
#apt-get update && apt-get install -y jq
#export KV_NAMESPACE_ID=$(wrangler kv:namespace list | jq -c 'map(select(.title | contains("KV_STATUS_PAGE")))' | jq -r ".[0].id")
#namespace_id=$(wrangler kv:namespace list | jq -c 'map(select(.title | contains("__status-workers_sites_assets")))' | jq -r ".[0].id")
#postCommands: |
#yarn kv-gc
env:
CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
KV_NAMESPACE_ID: ${{ secrets.KV_NAMESPACE_ID }}
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
timestamp:
runs-on: ubuntu-latest
needs: deploy
steps:
- uses: actions/checkout@v4
- name: Timestamp
shell: bash
run: |
date >> ./timestamp
zone=$(TZ='Europe/Bratislava' date -r ./timestamp)
sed -i "11s/.*/$zone/" ./.github/README.md
git config --global user.email ${{ secrets.EMAIL }}
git config --global user.name ${{ secrets.NAME }}
git add ./.github/README.md
git commit -m "timestamp" ./.github/README.md
git push --force