mirror of
https://github.com/privacyguides/privacyguides.org.git
synced 2025-07-02 01:32:41 +00:00
Deploy releases to BunnyCDN (#2466)
This commit is contained in:
72
.github/workflows/deploy.yml
vendored
72
.github/workflows/deploy.yml
vendored
@ -31,11 +31,19 @@ on:
|
||||
type: boolean
|
||||
github_pages:
|
||||
type: boolean
|
||||
bunnycdn_production:
|
||||
type: boolean
|
||||
minio_production:
|
||||
type: boolean
|
||||
outputs:
|
||||
netlify_preview_address:
|
||||
value: ${{ jobs.netlify_preview.outputs.address }}
|
||||
secrets:
|
||||
NETLIFY_TOKEN:
|
||||
PROD_BUNNYCDN_API_KEY:
|
||||
PROD_BUNNYCDN_PASSWORD:
|
||||
PROD_MINIO_KEY_ID:
|
||||
PROD_MINIO_SECRET_KEY:
|
||||
|
||||
jobs:
|
||||
netlify_preview:
|
||||
@ -90,7 +98,7 @@ jobs:
|
||||
|
||||
environment:
|
||||
name: production
|
||||
url: https://www.privacyguides.org
|
||||
url: https://illustrious-bavarois-56cf30.netlify.app/
|
||||
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
@ -165,3 +173,65 @@ jobs:
|
||||
|
||||
- id: deployment
|
||||
uses: actions/deploy-pages@main
|
||||
|
||||
bunnycdn_production:
|
||||
if: inputs.bunnycdn_production
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
environment:
|
||||
name: production
|
||||
url: https://privacyguides-org-production.b-cdn.net
|
||||
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: site-build-*
|
||||
merge-multiple: true
|
||||
|
||||
- run: |
|
||||
for file in *.tar.gz; do tar -zxf "$file"; done
|
||||
ls -la site/
|
||||
|
||||
- uses: own3d/bunny-action@bfaa5c6bc8b7a7ebd599ddd4912347d7c3847e78
|
||||
env:
|
||||
BUNNY_API_ACCESS_KEY: ${{ secrets.PROD_BUNNYCDN_API_KEY }}
|
||||
BUNNY_STORAGE_HOSTNAME: storage.bunnycdn.com
|
||||
BUNNY_STORAGE_USERNAME: ${{ vars.PROD_BUNNYCDN_USER }}
|
||||
BUNNY_STORAGE_PASSWORD: ${{ secrets.PROD_BUNNYCDN_PASSWORD }}
|
||||
BUNNY_PULL_ZONE_ID: 2117106
|
||||
with:
|
||||
args: deploy --dir=site
|
||||
|
||||
minio_production:
|
||||
if: inputs.minio_production
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
environment:
|
||||
name: production
|
||||
url: https://privacyguides-org-production.stor1-minio.jonaharagon.net
|
||||
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: site-build-*
|
||||
merge-multiple: true
|
||||
|
||||
- run: |
|
||||
for file in *.tar.gz; do tar -zxf "$file"; done
|
||||
ls -la site/
|
||||
|
||||
- uses: jakejarvis/s3-sync-action@master
|
||||
with:
|
||||
args: --acl public-read --follow-symlinks --delete
|
||||
env:
|
||||
SOURCE_DIR: "site/"
|
||||
AWS_S3_BUCKET: ${{ vars.PROD_MINIO_BUCKET }}
|
||||
AWS_S3_ENDPOINT: ${{ vars.PROD_MINIO_HOSTNAME }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.PROD_MINIO_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.PROD_MINIO_SECRET_KEY }}
|
||||
|
6
.github/workflows/publish-release.yml
vendored
6
.github/workflows/publish-release.yml
vendored
@ -88,8 +88,14 @@ jobs:
|
||||
with:
|
||||
netlify_production: true
|
||||
github_pages: true
|
||||
bunnycdn_production: true
|
||||
minio_production: true
|
||||
secrets:
|
||||
NETLIFY_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
|
||||
PROD_BUNNYCDN_API_KEY: ${{ secrets.PROD_BUNNYCDN_API_KEY }}
|
||||
PROD_BUNNYCDN_PASSWORD: ${{ secrets.PROD_BUNNYCDN_PASSWORD }}
|
||||
PROD_MINIO_KEY_ID: ${{ secrets.PROD_MINIO_KEY_ID }}
|
||||
PROD_MINIO_SECRET_KEY: ${{ secrets.PROD_MINIO_SECRET_KEY }}
|
||||
|
||||
cleanup:
|
||||
if: ${{ always() }}
|
||||
|
Reference in New Issue
Block a user