-
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.
- Loading branch information
1 parent
23b6ee5
commit 68d4796
Showing
6 changed files
with
86 additions
and
113 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
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 |
---|---|---|
|
@@ -24,55 +24,51 @@ jobs: | |
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '22' | ||
|
||
- name: set-up s5cmd | ||
- uses: actions/configure-pages@v3 | ||
- name: set-up s5cmd, for downloading assets | ||
uses: peak/action-setup-s5cmd@main | ||
with: | ||
version: v2.2.2 | ||
|
||
- run: npm ci | ||
- run: npm run build | ||
- run: npm test | ||
|
||
- name: 🗑️ delete temp assets symlink | ||
run: | | ||
rm -rf x/assets | ||
- uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.REGIS_DIRECTOR_DEPLOYER_SSH_PRIVATE_KEY }} | ||
- run: | | ||
npm ci | ||
npm run build | ||
npm test | ||
- name: deploy the director | ||
- name: 🗑️ delete dev symlinks | ||
run: | | ||
rsync -vhamz --delete --exclude ".git" --exclude "node_modules" -e "ssh -o StrictHostKeyChecking=no" ./ [email protected]:/home/deployer/app/ | ||
ssh -o StrictHostKeyChecking=no [email protected] "cd /home/deployer/app && bin/serverside/redeploy" | ||
rm x/assets | ||
rm x/node_modules | ||
rm x/s | ||
- name: 🌎 download assets | ||
- name: 🌎 download assets sources | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
S3_ENDPOINT_URL: "https://sfo2.digitaloceanspaces.com" | ||
run: | | ||
s5cmd cp "s3://benev-storage/regis/x/*" x/assets/ | ||
s5cmd cp "s3://benev-storage/regis/s/*" assets/s/ | ||
- name: 🚚 tracking ignored stuff | ||
- name: 🎠 converting assets | ||
run: bin/assets-convert | ||
|
||
- uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.REGIS_DIRECTOR_DEPLOYER_SSH_PRIVATE_KEY }} | ||
|
||
- name: 🎬 deploy the director | ||
run: | | ||
sed -i.bak -e '/^\/node_modules$/d' .gitignore | ||
sed -i.bak -e '/^\/x$/d' .gitignore | ||
rsync --delete -vhamz --exclude ".git" --exclude "node_modules" -e "ssh -o StrictHostKeyChecking=no" ./ [email protected]:/home/deployer/app/ | ||
ssh -o StrictHostKeyChecking=no [email protected] "cd /home/deployer/app && bin/serverside/redeploy" | ||
- name: 🗃️ reconstitute node_modules for production | ||
run: | | ||
rm -rf node_modules | ||
npm ci --omit=dev | ||
run: npm ci --omit=dev | ||
|
||
- name: 🗃️ copy files | ||
- name: 🍞 moving files into x | ||
run: | | ||
rm -rf x/node_modules x/s | ||
cp -r node_modules/ x/ | ||
cp -r s/ x/ | ||
- name: 📝 configure pages | ||
uses: actions/configure-pages@v3 | ||
mv node_modules x/node_modules | ||
mv s x/s | ||
mv assets/x x/assets | ||
- name: 📤 upload pages artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
|
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 | ||
|
||
banner() { | ||
echo ""; | ||
echo "### $1"; | ||
} | ||
|
||
banner "initialize the assets area"; | ||
mkdir -p assets/s; | ||
rm -rf assets/x; | ||
mkdir assets/x; | ||
|
||
banner "glbs"; | ||
npx @benev/batch 3d glb \ | ||
--verbose \ | ||
--tier "mid" \ | ||
--ignores="**/_*/**" \ | ||
--in "assets/s" \ | ||
--out "assets/x"; | ||
|
||
banner "audio"; | ||
npx @benev/batch audio m4a \ | ||
--verbose \ | ||
--kbps "64" \ | ||
--in "assets/s" \ | ||
--out "assets/x"; | ||
|
||
banner "images"; | ||
npx @benev/batch images webp \ | ||
--verbose \ | ||
--quality "90" \ | ||
--ignores "graphics/**" \ | ||
--size "1024" \ | ||
--in "assets/s" \ | ||
--out "assets/x"; | ||
|
||
banner "graphics"; | ||
npx @benev/batch copy \ | ||
--verbose \ | ||
--find "*" \ | ||
--in "assets/s/graphics" \ | ||
--out "assets/x/graphics"; | ||
|
||
banner "copy: other files"; | ||
npx @benev/batch copy \ | ||
--verbose \ | ||
--find "svg,json,env" \ | ||
--ignores "graphics/**" \ | ||
--in "assets/s" \ | ||
--out "assets/x"; | ||
|
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
This file was deleted.
Oops, something went wrong.
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