-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2bf75c8
Showing
15 changed files
with
10,903 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
on: [push] | ||
|
||
jobs: | ||
test-deploy: | ||
runs-on: ubuntu-latest | ||
name: A job to deploy canisters to the IC | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Deploy canisters | ||
id: deploy | ||
uses: ./ | ||
with: | ||
identity: ${{ secrets.DFX_IDENTITY }} | ||
wallets: ${{ secrets.DFX_WALLETS }} | ||
- name: Show success message | ||
run: echo success! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Various IDEs and Editors | ||
.vscode/ | ||
.idea/ | ||
**/*~ | ||
|
||
# Mac OSX temporary files | ||
.DS_Store | ||
**/.DS_Store | ||
|
||
# dfx temporary files | ||
.dfx/ | ||
|
||
# frontend code | ||
node_modules/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM node:14.16.0-alpine | ||
|
||
ENV NPM_CONFIG_PREFIX=/home/node/.npm-global | ||
ENV PATH="/home/node/.npm-global/bin:$PATH" | ||
|
||
USER node | ||
|
||
COPY dfx-install.sh /home/dfx-install.sh | ||
COPY entrypoint.sh /home/node/entrypoint.sh | ||
|
||
USER root | ||
|
||
RUN apk add --update curl | ||
|
||
RUN ["chmod", "+x", "/home/dfx-install.sh"] | ||
|
||
RUN ["sh", "-m", "/home/dfx-install.sh"] | ||
|
||
RUN ["chmod", "+x", "/home/node/entrypoint.sh"] | ||
|
||
ENTRYPOINT ["/home/node/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
![](https://storageapi.fleek.co/fleek-team-bucket/Blog%20Inline/ic-action.png) | ||
|
||
# Deploy Action | ||
[![Fleek](https://img.shields.io/badge/Made%20by-Fleek-blue)](https://fleek.co/) | ||
[![Dev Slack](https://img.shields.io/badge/Dev%20Slack-Channel-blue)](https://slack.fleek.co/) | ||
[![License](https://img.shields.io/badge/License-MIT-green)](https://github.com/FleekHQ/space-sdk/blob/master/LICENSE) | ||
|
||
|
||
## Introduction | ||
|
||
Fleek's Deploy Action provides an easy way to deploy your configured Fleek site's publish directory. | ||
|
||
## Example Usage | ||
|
||
Create a `.github/workflows/deploy.yml` workflow file in your repository with the following configuration: | ||
|
||
```yml | ||
on: [push] | ||
|
||
jobs: | ||
test-deploy: | ||
runs-on: ubuntu-latest | ||
name: A job to test the action-deploy action by deploying a test site | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Deploy test site | ||
id: deploy | ||
uses: fleekhq/action-deploy@v1 | ||
with: | ||
apiKey: ${{ secrets.FLEEK_API_KEY }} | ||
- name: Get the output url | ||
run: echo "Deploy url is ${{ steps.deploy.outputs.deployUrl }}" | ||
``` | ||
## Configuration Options | ||
The action can be configured with the following input arguments: | ||
- apiKey (required) - Your Fleek scoped API key that has permission to deploy to the configured site. | ||
- workDir (optional) - The location of your .fleek.json config file. Defaults to repositories base directory. | ||
- commitHash - (optional) - Optional git commit hash to deploy. Only useful for fleek sites linked to github. | ||
## Contributing | ||
To submit a feature, bug fix, or enhancement to Deploy Actions, follow these steps: | ||
1. Fork this repository. | ||
2. Make desired changes. | ||
3. Confirm a successful Docker build with `docker build -t fleekhq/action-deploy .`. | ||
4. [Open a Pull Request and follow the prompts](https://github.com/fleekhq/action-deploy/compare). | ||
|
||
We value and appreciate all contributions. | ||
|
||
## Related Resources | ||
|
||
- [Fleek CLI](https://github.com/fleekhq/fleek-cli) | ||
- [Fleek](https://fleek.co) | ||
|
||
## License | ||
|
||
Fleeks Deploy Action is licensed under a [GNU General Public License](LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: 'Fleek IC Action' | ||
description: 'Deploys canisters to the IC' | ||
author: 'Fleek Labs' | ||
branding: | ||
icon: circle | ||
color: gray-dark | ||
inputs: | ||
identity: | ||
description: 'IC identity for deploying the canisters' | ||
required: true | ||
wallets: | ||
description: 'IC wallets for deploying the canisters' | ||
required: true | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"hello": { | ||
"ic": "etxr6-uqaaa-aaaab-qamkq-cai" | ||
}, | ||
"hello_assets": { | ||
"ic": "e2u2c-cyaaa-aaaab-qamla-cai" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh -l | ||
echo y | sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"canisters": { | ||
"hello": { | ||
"main": "src/hello/main.mo", | ||
"type": "motoko" | ||
}, | ||
"hello_assets": { | ||
"dependencies": [ | ||
"hello" | ||
], | ||
"frontend": { | ||
"entrypoint": "src/hello_assets/public/index.js" | ||
}, | ||
"source": [ | ||
"src/hello_assets/assets", | ||
"dist/hello_assets/" | ||
], | ||
"type": "assets" | ||
} | ||
}, | ||
"defaults": { | ||
"build": { | ||
"packtool": "" | ||
} | ||
}, | ||
"dfx": "0.6.26", | ||
"networks": { | ||
"local": { | ||
"bind": "127.0.0.1:8000", | ||
"type": "ephemeral" | ||
} | ||
}, | ||
"version": 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh -l | ||
|
||
echo Creating deployer directory | ||
|
||
mkdir ~/.config | ||
mkdir ~/.config/dfx | ||
mkdir ~/.config/dfx/identity | ||
mkdir ~/.config/dfx/identity/default | ||
|
||
echo Adding identity.pem and wallets file file | ||
|
||
echo $INPUT_IDENTITY > ~/.config/dfx/identity/default/identity.pem | ||
sed -i 's/\\r\\n/\r\n/g' ~/.config/dfx/identity/default/identity.pem | ||
echo $INPUT_WALLETS > ~/.config/dfx/identity/default/wallets.json | ||
|
||
echo "Deploying to the IC" | ||
dfx deploy --network=ic |
Oops, something went wrong.