Skip to content

Commit

Permalink
Merge pull request #135 from aragon/DOPS-595-automate-publish-on-fleek
Browse files Browse the repository at this point in the history
Publish on Fleek Github workflow
  • Loading branch information
chilcano authored Nov 30, 2023
2 parents 6b839d6 + ee721f4 commit c297b1c
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/publish-on-fleek.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Publish on Fleek

on:
workflow_dispatch:
inputs:
source_branch:
description: "Publish content from branch (master|staging)"
required: true
default: staging
type: choice
options:
- master
- staging

jobs:

build-and-deploy:
runs-on: ubuntu-latest
steps:

- name: Checkout code ( Branch=${{ inputs.source_branch }} )
uses: actions/checkout@v4
with:
ref: ${{ inputs.source_branch }}

- name: Install NodeJS
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'

- name: Install and build
run: yarn && yarn build

- name: Activate Fleek
run: mv fleek_${{ inputs.source_branch }}.json .fleek.json

- name: Deploy on Fleek
id: deploy
uses: fleekhq/action-deploy@v1
with:
apiKey: ${{ secrets.FLEEK_API_KEY }}

- name: Get Fleek output URL ( Branch=${{ inputs.source_branch }} )
run: echo "The Fleek output URL is ${{ steps.deploy.outputs.deployUrl }}"
15 changes: 15 additions & 0 deletions fleek_master.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"site": {
"id": "0690a510-73ea-49d0-8df5-2490ea167fa8",
"team": "aragonone-team",
"platform": "ipfs",
"source": "github",
"name": "sweet-butterfly-2931"
},
"build": {
"baseDir": "",
"publicDir": "build/",
"command": "yarn && yarn build",
"rootDir": ""
}
}
15 changes: 15 additions & 0 deletions fleek_staging.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"site": {
"id": "5f741d3f-b4b4-4998-b829-bbbed8f1f54c",
"team": "aragonone-team",
"platform": "ipfs",
"source": "github",
"name": "holy-feather-8175"
},
"build": {
"baseDir": "",
"publicDir": "build/",
"command": "yarn && yarn build",
"rootDir": ""
}
}

0 comments on commit c297b1c

Please sign in to comment.