-
Notifications
You must be signed in to change notification settings - Fork 3
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
Showing
2 changed files
with
15 additions
and
21 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 |
---|---|---|
|
@@ -4,8 +4,6 @@ on: | |
branches: | ||
- 'main' | ||
- 'staging' | ||
|
||
|
||
jobs: | ||
tm: | ||
runs-on: ubuntu-latest | ||
|
@@ -38,6 +36,7 @@ jobs: | |
TM_IMPORT_MAX_FILESIZE: 3e+06 | ||
AWS_S3_BUCKET: tasks-staging.openhistoricalmap.org | ||
CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.STAGING_TM_CLOUDFRONT_DISTRIBUTION_ID }} | ||
|
||
- name: Set environment variables - Production | ||
if: github.ref == 'refs/heads/main' | ||
uses: allenevans/[email protected] | ||
|
@@ -61,29 +60,23 @@ jobs: | |
TM_IMPORT_MAX_FILESIZE: 3e+06 | ||
AWS_S3_BUCKET: tasks.openhistoricalmap.org | ||
CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.PRODUCTION_TM_CLOUDFRONT_DISTRIBUTION_ID }} | ||
|
||
- name: Checkout tasking-manager repo | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: OpenHistoricalMap/tasking-manager | ||
ref: c2e85feed9660eb66dfcd2009bec2b049dfe0260 | ||
path: tasking-manager | ||
ref: 3902d566d9d2d8d5a9c37bf61894ed649b581ee5 | ||
# token: ${{ env.DEV_GITHUB_TOKEN }} | ||
|
||
- name: Debug Checkout | ||
run: ls -la tasking-manager | ||
|
||
- name: Use Node.js 16 | ||
uses: actions/setup-node@v2 | ||
- name: Use Node.js 12 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '16' | ||
node-version: '12' | ||
|
||
- name: npm Install | ||
run: | | ||
cd tasking-manager/frontend && npm install && CI=true GENERATE_SOURCEMAP=false npm run build | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.8' | ||
npm install && npm run build | ||
working-directory: frontend | ||
|
||
- uses: actions/setup-python@v2 | ||
with: | ||
|
@@ -97,7 +90,7 @@ jobs: | |
- name: Sync to S3 and clean cache in cloudfront | ||
if: ${{ success() }} | ||
run: | | ||
aws s3 sync tasking-manager/frontend/build s3://${AWS_S3_BUCKET} --acl public-read --delete | ||
aws s3 sync frontend/build s3://${AWS_S3_BUCKET} --acl public-read --delete | ||
aws cloudfront create-invalidation --distribution-id=${CLOUDFRONT_DISTRIBUTION_ID} --paths=/ | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
|
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