mirror of
https://github.com/Instadapp/assets.git
synced 2024-07-29 22:27:41 +00:00
Added auto deployment config
This commit is contained in:
parent
7cf9d2490d
commit
7fbf816d2b
53
.github/workflows/build-publish-pipeline.yml
vendored
Normal file
53
.github/workflows/build-publish-pipeline.yml
vendored
Normal file
|
@ -0,0 +1,53 @@
|
|||
name: Synchronize with CDN
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
sync_with_cdn:
|
||||
name: Build Mainnet Image
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Synchronize with CDN
|
||||
env:
|
||||
AWS_ACCESS_KEY: ${{ secrets.CDN_ACCESS_KEY }}
|
||||
AWS_SECRET_KEY: ${{ secrets.CDN_SECRET_KEY }}
|
||||
CDN_BUCKET: ${{ secrets.CDN_BUCKET }}
|
||||
run: |
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
apt update -y
|
||||
# Install rclone
|
||||
apt install rclone -y
|
||||
|
||||
# Create a S3 target
|
||||
rclone config create s3 s3 provider=DigitalOcean env_auth=true region=fra1 endpoint=fra1.digitaloceanspaces.com acl=public-read
|
||||
|
||||
# remove `.github` and any other paths we do not want in the CDN
|
||||
rm -rf .github
|
||||
|
||||
# SYNC
|
||||
rclone sync -P . s3:$CDN_BUCKET/
|
||||
|
||||
- name: Purge cache
|
||||
run: |
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
# TODO
|
Loading…
Reference in New Issue
Block a user