Switch to custom action
This commit is contained in:
parent
63fd7322f2
commit
c800299948
33
.github/workflows/ci.yml
vendored
33
.github/workflows/ci.yml
vendored
@ -2,7 +2,7 @@ name: Build and deploy
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [master]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-wasm:
|
build-wasm:
|
||||||
@ -80,30 +80,33 @@ jobs:
|
|||||||
name: react-app-wasm
|
name: react-app-wasm
|
||||||
path: app
|
path: app
|
||||||
|
|
||||||
web3-storage:
|
pin:
|
||||||
name: Push to web3.storage
|
name: Pin to cluster node
|
||||||
needs: merge
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: catthehacker/ubuntu:act-latest
|
||||||
outputs:
|
outputs:
|
||||||
cid: ${{ steps.web3.outputs.cid }}
|
cid: ${{ steps.pin.outputs.cid }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: react-app-wasm
|
name: react-app-wasm
|
||||||
path: react-app-wasm
|
path: app
|
||||||
|
|
||||||
- name: Push to web3.storage
|
- name: pin
|
||||||
uses: web3-storage/add-to-web3@v1
|
id: pin
|
||||||
id: web3
|
uses: docker://gitea.bruyant.xyz/alexandre/ipfs-node-pin:main
|
||||||
with:
|
with:
|
||||||
web3_token: ${{ secrets.WEB3_STORAGE_TOKEN }}
|
ipfs_host: "ipfs-api.ipfs.svc"
|
||||||
path_to_add: react-app-wasm
|
ipfs_port: "5001"
|
||||||
|
path_to_add: app
|
||||||
- run: echo ${{ steps.web3.outputs.cid }}
|
- name: print CID
|
||||||
|
run: echo ${{ steps.pin.outputs.cid }}
|
||||||
|
|
||||||
update-dns:
|
update-dns:
|
||||||
name: Update OVH DNS
|
name: Update OVH DNS
|
||||||
needs: [web3-storage]
|
needs: [pin]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: OVH alter DNS record
|
- name: OVH alter DNS record
|
||||||
@ -114,7 +117,7 @@ jobs:
|
|||||||
consumer-key: ${{ secrets.OVH_CONSUMER_KEY }}
|
consumer-key: ${{ secrets.OVH_CONSUMER_KEY }}
|
||||||
dns-zone: bruyant.xyz
|
dns-zone: bruyant.xyz
|
||||||
record-id: 5218627602
|
record-id: 5218627602
|
||||||
target: "dnslink=/ipfs/${{ needs.web3-storage.outputs.cid }}"
|
target: "dnslink=/ipfs/${{ needs.pin.outputs.cid }}"
|
||||||
|
|
||||||
- name: OVH refresh DNS zone
|
- name: OVH refresh DNS zone
|
||||||
uses: CrispyBaguette/ovh-dns-refresh-action@v1.0.1
|
uses: CrispyBaguette/ovh-dns-refresh-action@v1.0.1
|
||||||
|
Loading…
Reference in New Issue
Block a user