forked from primodiumxyz/primodium
-
Notifications
You must be signed in to change notification settings - Fork 0
chore: added action to deploy primodium #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
e388f12
init session key flow impl
ultraviolet10 34a8f48
chore: added action to deplpy primodium
GabrielMartinezRodriguez 3b954ce
chore: deploy on pull request
GabrielMartinezRodriguez c059d2d
chore: install pnpm inside gh action
GabrielMartinezRodriguez 0deb500
chore: remove pnpm version
GabrielMartinezRodriguez 58f4999
chore: install foundry
GabrielMartinezRodriguez 2d93e58
chore: changed build command
GabrielMartinezRodriguez 83a03cb
chore: use .env file
GabrielMartinezRodriguez 6677cc4
chore: unix2dos
GabrielMartinezRodriguez a3ec278
chore: format .env file
GabrielMartinezRodriguez 046d488
chore: force deploy
GabrielMartinezRodriguez cdf37bd
chore: force deploy
GabrielMartinezRodriguez cad6dce
add jsdom, use v0.3.0 of foundry
gawnieg 3fccfad
pr feedback
gawnieg 9df6824
rm on pull_request
gawnieg 16eaa46
add badge
gawnieg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,62 @@ | ||
| name: Deploy primodium interface | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| # pull_request: | ||
|
|
||
| jobs: | ||
| deploy: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4.2.0 | ||
|
|
||
| - uses: pnpm/action-setup@v4 | ||
|
|
||
| - name: Install Foundry | ||
| uses: foundry-rs/foundry-toolchain@v1 | ||
|
|
||
| - name: Build code | ||
| run: | | ||
| cat > .env <<-EOF | ||
| ${{vars.PRIMODIUM_ENV_FILE}} | ||
| EOF | ||
| pnpm install | ||
| pnpm build:client-core | ||
|
|
||
| - name: Copy files to server | ||
| uses: appleboy/scp-action@v0.1.7 | ||
| with: | ||
| host: ${{ secrets.SERVER_HOST }} | ||
| username: ${{ secrets.SERVER_USERNAME }} | ||
| key: ${{ secrets.SERVER_KEY }} | ||
| port: ${{ secrets.SERVER_PORT }} | ||
| source: "packages/client/dist" | ||
| debug: true | ||
| target: /home/deployer/primodium-interface | ||
| strip_components: 3 # Remove the first 3 levels of directories from the source path to copy only the files inside dist | ||
| rm: true | ||
|
|
||
| - name: Deploy primodium interface to server | ||
| uses: appleboy/ssh-action@v1.1.0 | ||
| with: | ||
| host: ${{ secrets.SERVER_HOST }} | ||
| username: ${{ secrets.SERVER_USERNAME }} | ||
| key: ${{ secrets.SERVER_KEY }} | ||
| port: ${{ secrets.SERVER_PORT }} | ||
aodhgan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| debug: true | ||
| script_stop: true | ||
| script: | | ||
| chmod -R o+rX /home/deployer/primodium-interface | ||
| mv /home/deployer/primodium-interface /tmp | ||
| sudo -u primodium_interface bash -c ' | ||
| rm -rf /var/www/primodium-interface/* | ||
| cp -r /tmp/primodium-interface/* /var/www/primodium-interface | ||
| ' | ||
| rm -rf /tmp/primodium-interface | ||
|
|
||
|
|
||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.