-
Notifications
You must be signed in to change notification settings - Fork 36
70 lines (60 loc) · 2.37 KB
/
Copy pathrelease-dev.yml
File metadata and controls
70 lines (60 loc) · 2.37 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Release library and media to artifact(dev)
on:
workflow_dispatch:
jobs:
release:
name: Release to github and artifact
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Check out code
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install requests
- name: Fetch catalog inputs
env:
CONTENTFUL_GRAPHQL_TOKEN: ${{ secrets.CONTENTFUL_GRAPHQLTOKEN }}
run: |
python build/fetch_catalog.py \
--channel dev \
--output-dir dist/catalog-source
- name: Build legacy and v2 artifacts
run: |
python build/library_publish.py \
--channel dev \
--output-dir dist/publish \
--catalog-source-dir dist/catalog-source
- name: Upload workflow artifact
uses: actions/upload-artifact@v4
with:
name: publish-dev
path: dist/publish
- name: Upload legacy library to Cloudflare R2
uses: ryand56/r2-upload-action@latest
with:
r2-account-id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
r2-access-key-id: ${{ secrets.CLOUDFLARE_R2_SECRET_ID }}
r2-secret-access-key: ${{ secrets.CLOUDFLARE_R2_SECRET_KEY }}
r2-bucket: artifact
source-dir: dist/publish/legacy/dev/library
destination-dir: ./dev/websoft9/plugin/library
- name: Upload legacy media to Cloudflare R2
uses: ryand56/r2-upload-action@latest
with:
r2-account-id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
r2-access-key-id: ${{ secrets.CLOUDFLARE_R2_SECRET_ID }}
r2-secret-access-key: ${{ secrets.CLOUDFLARE_R2_SECRET_KEY }}
r2-bucket: artifact
source-dir: dist/publish/legacy/dev/media
destination-dir: ./dev/websoft9/plugin/media
- name: Purge Cloudflare Cache
uses: jakejarvis/cloudflare-purge-action@master
env:
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE_ID }}
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
PURGE_URLS: '["https://artifact.websoft9.com/dev/websoft9/plugin/library/library-dev.zip","https://artifact.websoft9.com/dev/websoft9/plugin/media/media-dev.zip"]'