Skip to content

Commit

Permalink
Merge pull request #1809 from ardriveapp/PE-6396-setup-ci-cd-for-perm…
Browse files Browse the repository at this point in the history
…aweb-deploy

PE-6396: Setup CI/CI for permaweb deploy
  • Loading branch information
kunstmusik authored Jul 30, 2024
2 parents 84590eb + c041232 commit 5458969
Show file tree
Hide file tree
Showing 6 changed files with 2,667 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ jobs:
firebaseServiceAccount: '${{ secrets.FIREBASE_CI_SERVICE_ACCOUNT }}'
channelId: live

# Deploy to Arweave
- run: |
scr deploy-to-arweave
env:
DEPLOY_ANT_PROCESS_ID: ${{ secrets.DEPLOY_ANT_PROCESS_ID }}
DEPLOY_ANT_UNDERNAME: ${{ secrets.DEPLOY_ANT_UNDERNAME }}
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
build-ios:
# skipped for now
if: false
Expand Down
1 change: 1 addition & 0 deletions deploy/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
15 changes: 15 additions & 0 deletions deploy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Deploy to Arweave

The deployer app here uses [permaweb-deploy](https://github.com/permaweb/permaweb-deploy) to deploy the ArDrive app to Arweave and update the ArNS name to point to the new deployment. Developers can deploy their own versions of the application to arweave using `yarn deploy`.

Note: The application must be built in the root folder for web prior to using `yarn deploy

Running `yarn deploy` uses the following environment variables:

```
export DEPLOY_ANT_PROCESS_ID=[process id of the ant process to deploy to]
export DEPLOY_ANT_UNDERNAME=[undername to deploy to]
export DEPLOY_KEY=[base64 encoded version of wallet keyfile]
```

For local testing, you can create a deploy.sh script with the above values defined, run `source deploy.sh`, then use `yarn deploy`.
15 changes: 15 additions & 0 deletions deploy/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "deploy",
"version": "1.0.0",
"description": "Deployer app for deploying ArDrive to arweave using permaweb-deploy",
"main": "index.js",
"license": "AGPL-3.0-only",
"scripts": {
"deploy": "rm -f ../build/web-* && permaweb-deploy --ant-process ${DEPLOY_ANT_PROCESS_ID} --deploy-folder=../build/web --undername=${DEPLOY_ANT_UNDERNAME}"
},

"dependencies": {
"permaweb-deploy": "1.1.6"
}

}
Loading

0 comments on commit 5458969

Please sign in to comment.