File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy
2+ on :
3+ push :
4+ branches : [main]
5+
6+ jobs :
7+ deploy :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - uses : actions/checkout@v4
11+
12+ - uses : actions/setup-node@v4
13+ with :
14+ node-version : ' 22'
15+ cache : ' npm'
16+
17+ - run : npm ci
18+ - run : npm run build
19+
20+ - name : Upload to Bunny Edge Storage
21+ env :
22+ BUNNY_STORAGE_PASSWORD : ${{ secrets.BUNNY_STORAGE_PASSWORD }}
23+ BUNNY_STORAGE_ZONE : ${{ secrets.BUNNY_STORAGE_ZONE }}
24+ run : |
25+ ENDPOINT="https://se.storage.bunnycdn.com"
26+ cd dist
27+ find . -type f | while read -r file; do
28+ filepath="${file#./}"
29+ echo "Uploading: $filepath"
30+ curl -s -X PUT \
31+ "${ENDPOINT}/${BUNNY_STORAGE_ZONE}/${filepath}" \
32+ -H "AccessKey: ${BUNNY_STORAGE_PASSWORD}" \
33+ -H "Content-Type: application/octet-stream" \
34+ --upload-file "$filepath" \
35+ --fail \
36+ || { echo "FAILED: $filepath"; exit 1; }
37+ done
38+
39+ - name : Purge CDN cache
40+ run : |
41+ curl -s -X POST \
42+ "https://api.bunny.net/pullzone/${{ secrets.BUNNY_PULL_ZONE_ID }}/purgeCache" \
43+ -H "AccessKey: ${{ secrets.BUNNY_API_KEY }}" \
44+ --fail
Original file line number Diff line number Diff line change 1+ name : Licence Scan
2+ on : [push]
3+
4+ jobs :
5+ scan :
6+ runs-on : ubuntu-latest
7+ steps :
8+ - uses : actions/checkout@v4
9+
10+ - name : Install ScanCode
11+ run : pip install scancode-toolkit
12+
13+ - name : Scan source
14+ run : scancode --license --only-findings --json scan-results.json src/
15+
16+ - name : Upload results
17+ uses : actions/upload-artifact@v4
18+ with :
19+ name : licence-scan
20+ path : scan-results.json
You can’t perform that action at this time.
0 commit comments