Skip to content

Commit

Permalink
depoy production
Browse files Browse the repository at this point in the history
  • Loading branch information
jjavieralv committed Mar 1, 2024
1 parent 1c3a340 commit 9d4473b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 7 deletions.
9 changes: 9 additions & 0 deletions .github/fleek/fleekxyz_production.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"sites": [
{
"slug": "production-aragon-app",
"distDir": "dist",
"buildCommand": ""
}
]
}
2 changes: 1 addition & 1 deletion .github/fleek/fleekxyz_staging.config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"sites": [
{
"slug": "staging.aragon-app",
"slug": "staging-aragon-app",
"distDir": "dist",
"buildCommand": ""
}
Expand Down
24 changes: 18 additions & 6 deletions .github/workflows/fleekxyz_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
runs-on: ubuntu-latest
outputs:
#environment: ${{ steps.envdev.outputs.environment }}${{ steps.envprod.outputs.environment }}
#workaround to use allways staging
environment: 'staging'
#workaround to use allways the same environmnet (will be fixed once we merge with default branch)
environment: 'production'
steps:
- name: Set environment to staging
if: endsWith(github.ref, '/develop')
Expand All @@ -35,8 +35,10 @@ jobs:
if: needs.set-environment.outputs.environment != ''
environment: ${{ needs.set-environment.outputs.environment }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Checkout main branch
uses: actions/checkout@v4
with:
ref: main
- name: Install NodeJS
uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -71,14 +73,24 @@ jobs:
env:
FLEEK_FILE: ${{ needs.set-environment.outputs.environment }}
run: mv ./.github/fleek/fleekxyz_${FLEEK_FILE}.config.json fleek.config.json
- name: Load credentials from 1Password
id: op-credentials
uses: 1password/load-secrets-action@v1
with:
export-env: false
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{secrets.OP_SERVICE_ACCOUNT_TOKEN_PRODUCTION}}
FLEEK_PROJECT_ID: op://apikeys_production/fleek.xyz_aragon-production/username
FLEEK_TOKEN: op://apikeys_production/fleek.xyz_aragon-production/credential

- name: Install Fleek CLI
run: npm i -g @fleekxyz/cli
- name: Deploy through Fleek
id: deploy
run: ls -la && fleek sites deploy; tree
env:
FLEEK_TOKEN: ${{ secrets.FLEEKXYZ_TOKEN }}
FLEEK_PROJECT_ID: ${{ vars.FLEEKXYZ_PROJECT_ID }}
FLEEK_TOKEN: ${{ steps.op-credentials.outputs.FLEEK_TOKEN}}
FLEEK_PROJECT_ID: ${{ steps.op-credentials.outputs.FLEEK_PROJECT_ID}}

- name: Get the Fleek output url
run: echo "The Fleek deploy url is ${{ steps.deploy.outputs.deployUrl }}"
Expand Down

0 comments on commit 9d4473b

Please sign in to comment.