Multi location support #96
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: 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' }} |