-
Notifications
You must be signed in to change notification settings - Fork 13
28 lines (26 loc) · 1.1 KB
/
build.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
name: Build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 19
cache: "npm"
- run: npm ci
- run: npm run staging
- run: npm run rename_index_files
- name: Install LFTP
run: sudo apt update && sudo apt -qq -y install lftp
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
- name: Upload ftp
run: lftp storage.bunnycdn.com -u open-meteo-staging,${{ secrets.ftp_password_staging }} -e "set ftp:ssl-force false; set ssl:verify-certificate false; mirror --reverse --continue --dereference -x ^\.git/$ build .; quit"
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
- run: "curl --request POST --url https://api.bunny.net/pullzone/277769/purgeCache --header 'AccessKey: ${{ secrets.bunny_api_key }}' --header 'content-type: application/json'"
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}