-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(github actions): disable and save state
- Loading branch information
Showing
5 changed files
with
77 additions
and
5 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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
name: deploy-changed-apps | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
workflow_dispatch | ||
# on: | ||
# push: | ||
# branches: | ||
# - master | ||
|
||
jobs: | ||
build_and_deploy: | ||
|
@@ -23,7 +25,9 @@ jobs: | |
node_modules | ||
~/.cache/Cypress # needed for the Cypress binary | ||
key: npm-dependencies-${{ hashFiles('package.json') }} | ||
- run: pnpm install | ||
- name: Install dependencies | ||
run: pnpm install | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
- name: Cache npm dependencies | ||
uses: actions/cache/save@v3 | ||
with: | ||
|
@@ -32,3 +36,7 @@ jobs: | |
~/.cache/Cypress # needed for the Cypress binary | ||
key: npm-dependencies-${{ hashFiles('package.json') }} | ||
- run: npx [email protected] affected -t docker-compose --base=origin/master~1 --head=origin/master | ||
- name: Install doctl | ||
uses: digitalocean/action-doctl@v2 | ||
with: | ||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} |
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 @@ | ||
FROM nginx:latest | ||
COPY ./apps/web/html/hello.html /usr/share/nginx/html/hello.html |
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,51 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# # Build images | ||
# docker build -t linkerry/test -f ./apps/web/Dockerfile-test . | ||
|
||
# # Push docker image to container registry | ||
# docker login -u "$CONTAINER_REGISTRY_USERNAME" -p "$CONTAINER_REGISTRY_PASSWORD" "$CONTAINER_REGISTRY_ADDRESS" | ||
|
||
# docker tag linkerry/test registry.digitalocean.com/linkerry/web:"$ENV" | ||
# docker push registry.digitalocean.com/linkerry/web:"$ENV" | ||
|
||
# prepare env file | ||
|
||
# sshpass -p "$SSH_PASSPHRASE" ssh [email protected] "mkdir test2 && exit\r" | ||
# sshpass -p "pass" ssh -o StrictHostKeyChecking=no [email protected] << EOSSH | ||
# mkdir test2 | ||
# EOSSH | ||
# sshpass -p "pass" ssh -v -o StrictHostKeyChecking=no [email protected] "mkdir test2 2>&1" | ||
sshpass -p "pass" ssh -v -o StrictHostKeyChecking=no [email protected] < ./apps/web/script.sh | ||
|
||
# expect -c " | ||
# spawn ssh [email protected] | ||
# expect \"Enter passphrase for key '/Users/anteqkois/.ssh/id_rsa':\" | ||
# send \"$SSH_PASSPHRASE\r\" | ||
# interact | ||
# " | ||
|
||
# # Use expect to interact with the SSH command | ||
# expect -c " | ||
# spawn ssh [email protected] | ||
# expect { | ||
# \"Enter passphrase for key '$SSH_KEY_PATH':\" { | ||
# send \"$SSH_PASSPHRASE\r\" | ||
# exp_continue | ||
# } | ||
# \"assword:\" { | ||
# send \"$SSH_PASSPHRASE\r\" | ||
# exp_continue | ||
# } | ||
# \"yes/no\" { | ||
# send \"yes\r\" | ||
# exp_continue | ||
# } | ||
# eof | ||
# # Run commands on the remote server | ||
# send \"mkdir test2 && exit\r\" | ||
# expect eof | ||
# } | ||
# " |
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,9 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Hello World!</title> | ||
</head> | ||
<body> | ||
<p>This is an example of a simple HTML page served from the Nginx container.</p> | ||
</body> | ||
</html> |
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