-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (52 loc) · 1.66 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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