Skip to content

Commit

Permalink
Merge pull request #11649 from CesiumGS/update-deployment
Browse files Browse the repository at this point in the history
Simplify deployments and update to new production buckets
  • Loading branch information
ggetz authored Dec 1, 2023
2 parents 8c3e91e + 1d426cb commit 03dd717
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 553 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,22 @@ jobs:
- uses: ./.github/actions/verify-package
- name: deploy to s3
if: ${{ env.AWS_ACCESS_KEY_ID != '' }}
run: npm run deploy-s3 -- -b "cesium-public-builds" -d cesium/$BRANCH -c 'no-cache' --confirm
run: |
aws s3 sync . s3://cesium-public-builds/cesium/$BRANCH/ \
--cache-control "no-cache" \
--exclude ".git/*" \
--exclude ".concierge/*" \
--exclude ".github/*" \
--exclude ".husky/*" \
--exclude ".vscode/*" \
--exclude "Build/Coverage/*" \
--exclude "Build/CesiumDev/*" \
--exclude "Build/Specs/e2e" \
--exclude "Documentation/*" \
--exclude "node_modules/*" \
--exclude "scripts/*" \
--exclude "Tools/*" \
--delete
- name: set status
if: ${{ env.AWS_ACCESS_KEY_ID != '' }}
run: npm run deploy-status -- --status success --message Deployed
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,9 @@ jobs:
run: npm run build-apps
- name: deploy to cesium.com
if: ${{ env.AWS_ACCESS_KEY_ID != '' }}
run: npm run deploy-s3 -- -b "cesium.com-next" -c 'public, max-age=1800' --skip --confirm
run: |
unzip Cesium-$(cat package.json | jq -r '.version').zip -d Build/release/ -x "Apps"
aws s3 sync Build/release/ s3://cesium-website/cesiumjs/releases/$(cat package.json | jq -r '.version')/ --cache-control "public, max-age=1800" --delete
aws s3 sync Build/Documentation/ s3://cesium-website/cesiumjs/ref-doc/ --cache-control "public, max-age=1800" --delete
aws s3 sync Build/CesiumViewer/ s3://cesium-website/cesiumjs/cesium-viewer/ --cache-control "public, max-age=1800" --delete
aws s3 sync Build/Sandcastle/ s3://cesium-sandcastle-website/ --cache-control "public, max-age=1800" --delete
5 changes: 2 additions & 3 deletions Documentation/Contributors/BuildGuide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ Here's the full set of scripts and what they do.
- `test-webgl-validation` - Runs all tests with Karma and enables low-level WebGL validation
- `test-release` - Runs all tests on the minified release version of built Cesium
- **Deployment scripts**
- `deploy-s3` - Deploys the built CesiumJS files, the npm package, and the zip file to Amazon S3. This requires having credentials set up for the S3 bucket to which you are deploying
- `deploy-status` - Sets the deployment statuses in GitHub, for use in CI
- `deploy-set-version` - Sets the version of `package.json`, for use in CI

Expand Down Expand Up @@ -179,7 +178,7 @@ aws s3 sync ./Build/Coverage s3://cesium-public-builds/cesium/$BRANCH/Build/Cove
```

```yml
npm run deploy-s3 -- -b "cesium-public-builds" -d cesium/$BRANCH -c 'no-cache' --confirm
aws s3 sync Build/unzipped/ s3://cesium-public-builds/cesium/$BRANCH/Build/ --cache-control "no-cache" --delete
```

- In `gulpfile.js`, edit the following line:
Expand All @@ -188,7 +187,7 @@ npm run deploy-s3 -- -b "cesium-public-builds" -d cesium/$BRANCH -c 'no-cache' -
const devDeployUrl = "https://ci-builds.cesium.com/cesium/";
```

- Edit the URL to match the URL of the S3 bucket specified in the previous step.
- Edit the URL to match the URL hosting the S3 bucket specified in the previous step.

### Configure S3 Credentials

Expand Down
Loading

0 comments on commit 03dd717

Please sign in to comment.