Skip to content

Commit e0b4f10

Browse files
committed
Update deployment workflow to include AWS region flag and adjust deployment scripts for repository name change
1 parent b58300e commit e0b4f10

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ jobs:
178178
- name: Whitelist Runner IP in AWS Security Group
179179
run: |
180180
aws ec2 authorize-security-group-ingress \
181+
--region ${{ secrets.AWS_REGION }} \
181182
--group-id ${{ secrets.AWS_SECURITY_GROUP_ID }} \
182183
--protocol tcp \
183184
--port 22 \
@@ -251,6 +252,7 @@ jobs:
251252
if: always()
252253
run: |
253254
aws ec2 revoke-security-group-ingress \
255+
--region ${{ secrets.AWS_REGION }} \
254256
--group-id ${{ secrets.AWS_SECURITY_GROUP_ID }} \
255257
--protocol tcp \
256258
--port 22 \
@@ -274,6 +276,7 @@ jobs:
274276
- name: Whitelist Runner IP in AWS Security Group
275277
run: |
276278
aws ec2 authorize-security-group-ingress \
279+
--region ${{ secrets.AWS_REGION }} \
277280
--group-id ${{ secrets.AWS_SECURITY_GROUP_ID }} \
278281
--protocol tcp \
279282
--port 22 \
@@ -314,7 +317,7 @@ jobs:
314317
rm -rf deployment-package || true
315318
# Create isolated temp dir
316319
TEMP_DIR=$(mktemp -d)
317-
# Sync repo files to temp
320+
# Sync repo files to temp (exclusions prevent bloat/self-ref)
318321
rsync -av \
319322
--exclude=node_modules \
320323
--exclude=.git \
@@ -323,9 +326,9 @@ jobs:
323326
--exclude=storage/logs \
324327
--exclude=vendor \
325328
. "$TEMP_DIR/"
326-
# Copy assets into temp/public/
329+
# Copy assets into temp/public/ (these are already built via npm run production)
327330
cp -r public/css public/js public/fonts public/images public/svg public/mix-manifest.json "$TEMP_DIR/public/" || true
328-
# Move to package name
331+
# Rename to package name
329332
mv "$TEMP_DIR" deployment-package
330333
- name: Upload deployment artifact
331334
uses: actions/upload-artifact@v4
@@ -346,6 +349,7 @@ jobs:
346349
if: always()
347350
run: |
348351
aws ec2 revoke-security-group-ingress \
352+
--region ${{ secrets.AWS_REGION }} \
349353
--group-id ${{ secrets.AWS_SECURITY_GROUP_ID }} \
350354
--protocol tcp \
351355
--port 22 \

deploy.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,12 @@
3232

3333
namespace Deployer;
3434

35+
require 'recipe/laravel.php';
3536
require 'recipe/laravel.php';
3637
require 'deploy/custom.php';
3738

3839
// Deployment Configuration
39-
set('repository', 'https://github.com/iDigAcademy/DigitizationAcademy.git');
40+
set('repository', 'https://github.com/AustinMastLab/DigitizationAcademy.git');
4041
set('base_path', '/data/web');
4142
set('remote_user', 'ubuntu');
4243
set('php_fpm_version', '8.3');

deploy/custom.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
// Environment variables automatically provided by GitHub Actions workflow
9494
$githubToken = $_ENV['GITHUB_TOKEN'] ?? getenv('GITHUB_TOKEN') ?? '';
9595
$githubSha = $_ENV['GITHUB_SHA'] ?? getenv('GITHUB_SHA') ?? '';
96-
$githubRepo = $_ENV['GITHUB_REPO'] ?? getenv('GITHUB_REPO') ?? 'iDigAcademy/DigitizationAcademy';
96+
$githubRepo = $_ENV['GITHUB_REPO'] ?? getenv('GITHUB_REPO') ?? 'AustinMastLab/DigitizationAcademy';
9797

9898
// Validate required environment variables
9999
if (empty($githubToken) || empty($githubSha)) {

0 commit comments

Comments
 (0)