-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: --cache-control="public, max-age=120" to google storage files
- Loading branch information
1 parent
dbdab91
commit 73d1417
Showing
3 changed files
with
74 additions
and
57 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 |
---|---|---|
|
@@ -17,30 +17,27 @@ jobs: | |
clean: true | ||
fetch-depth: '0' | ||
lfs: 'false' | ||
|
||
- name: SETTING Node and Github Packages | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.13.1 | ||
registry-url: 'https://npm.pkg.github.com' | ||
scope: '@aziontech' | ||
always-auth: true | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGES_SECRET }} | ||
|
||
- name: INSTALLING DEPENDENCIES | ||
run: npm install | ||
|
||
run: | | ||
npm install | ||
npm run tsc | ||
- name: BUILD | ||
run: export NODE_OPTIONS="--max-old-space-size=8120" && export PUBLIC_GITHUB_TOKEN="${{ secrets.GH_PACKAGES_SECRET }}" && npm run build-development | ||
|
||
run: | | ||
export NODE_OPTIONS="--max-old-space-size=8120" | ||
export PUBLIC_GITHUB_TOKEN="${{ secrets.GH_PACKAGES_SECRET }}" | ||
npm run build-development | ||
- name: PREPARE TO DEPLOYMENT | ||
run: rm -rf .eslintignore .eslintrc.js .prettierignore .prettierrc .nvmrc .npmrc pnpm-lock.yaml .astro .github node_modules src .editorconfig .gitignore astro.config.ts LICENSE package-lock.json package.json README.md tsconfig.json public plugins cicd .git CODE_OF_CONDUCT.md helpcenter-cleaner.js postcss.config.js | ||
|
||
run: | | ||
rm -rf .eslintignore .eslintrc.js .prettierignore .prettierrc .nvmrc .npmrc pnpm-lock.yaml .astro .github node_modules src .editorconfig .gitignore astro.config.ts LICENSE package-lock.json package.json README.md tsconfig.json public plugins cicd .git CODE_OF_CONDUCT.md helpcenter-cleaner.js postcss.config.js | ||
- name: PREPARE DIST FOLDER | ||
run: mv dist/* ./ && rm -rf dist | ||
|
||
- name: DEPLOYMENT | ||
run: | | ||
mv dist/* ./ | ||
rm -rf dist | ||
- name: PUBLISING | ||
uses: patrickwyler/[email protected] | ||
with: | ||
secrets: ${{ secrets.GCP_EXP_ENG }} | ||
|
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 |
---|---|---|
|
@@ -17,44 +17,55 @@ jobs: | |
clean: true | ||
fetch-depth: '0' | ||
lfs: 'false' | ||
|
||
- name: SETTING Node and Github Packages | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.13.1 | ||
registry-url: 'https://npm.pkg.github.com' | ||
scope: '@aziontech' | ||
always-auth: true | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGES_SECRET }} | ||
|
||
- name: INSTALLING DEPENDENCIES | ||
run: npm install | ||
|
||
run: | | ||
npm install | ||
npm run tsc | ||
- name: CHECKER MEMORY | ||
run: npm run check-memory | ||
|
||
run: | | ||
npm run check-memory | ||
# - name: CHECKER | ||
# run: npm run check | ||
|
||
# run: | | ||
# npm run check | ||
- name: BUILD | ||
run: export NODE_OPTIONS="--max-old-space-size=8120" && export PUBLIC_GITHUB_TOKEN="${{ secrets.GH_PACKAGES_SECRET }}" && npm run build-production | ||
|
||
run: | | ||
export NODE_OPTIONS="--max-old-space-size=8120" | ||
export PUBLIC_GITHUB_TOKEN="${{ secrets.GH_PACKAGES_SECRET }}" | ||
npm run build-production | ||
- name: UPDATE Algolia data | ||
run: npm install algoliasearch stream-json && node cicd/algolia-reindex.cjs app=${{ secrets.ALGOLIA_CONF_APP }} api=${{ secrets.ALGOLIA_CONF_API }} | ||
|
||
run: | | ||
npm install algoliasearch stream-json | ||
node cicd/algolia-reindex.cjs app=${{ secrets.ALGOLIA_CONF_APP }} api=${{ secrets.ALGOLIA_CONF_API }} | ||
- name: PREPARE TO DEPLOYMENT | ||
run: rm -rf .eslintignore .eslintrc.js .prettierignore .prettierrc .nvmrc .npmrc pnpm-lock.yaml .astro .github node_modules src .editorconfig .gitignore astro.config.ts LICENSE package-lock.json package.json README.md tsconfig.json public plugins .git CODE_OF_CONDUCT.md helpcenter-cleaner.js postcss.config.js | ||
|
||
run: | | ||
rm -rf .eslintignore .eslintrc.js .prettierignore .prettierrc .nvmrc .npmrc pnpm-lock.yaml .astro .github node_modules src .editorconfig .gitignore astro.config.ts LICENSE package-lock.json package.json README.md tsconfig.json public plugins .git CODE_OF_CONDUCT.md helpcenter-cleaner.js postcss.config.js | ||
- name: PREPARE DIST FOLDER | ||
run: mv dist/* ./ && rm -rf dist; ls -la; | ||
|
||
- name: DEPLOYMENT | ||
run: | | ||
mv dist/* ./ | ||
rm -rf dist | ||
- name: PUBLISHING | ||
uses: patrickwyler/[email protected] | ||
with: | ||
secrets: ${{ secrets.GCP_EXP_ENG }} | ||
bucket: azdocs | ||
|
||
- name: PURGE Documentation | ||
run: npm install axios && node cicd/cdn-purge.js basic_token=${{ secrets.MKT_BASIC_TOKEN }} | ||
- name: INSTALL gcloud CLI | ||
run: | | ||
apt-get update && apt-get install -y curl apt-transport-https ca-certificates gnupg | ||
curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg | ||
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list | ||
apt-get update && apt-get install -y google-cloud-sdk | ||
- uses: 'google-github-actions/auth@v2' | ||
with: | ||
credentials_json: ${{ secrets.GCP_EXP_ENG }} | ||
- name: UPDATING cache-control header from Google Cloud Storage | ||
run: | | ||
gcloud storage objects update -r gs://azdocs --cache-control="public, max-age=120" | ||
- name: PURGE Documentation from Edge Cache | ||
run: | | ||
npm install axios | ||
node cicd/cdn-purge.js basic_token=${{ secrets.MKT_BASIC_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 |
---|---|---|
|
@@ -17,32 +17,41 @@ jobs: | |
clean: true | ||
fetch-depth: '0' | ||
lfs: 'false' | ||
|
||
- name: SETTING Node and Github Packages | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.13.1 | ||
registry-url: 'https://npm.pkg.github.com' | ||
scope: '@aziontech' | ||
always-auth: true | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGES_SECRET }} | ||
|
||
- name: INSTALLING DEPENDENCIES | ||
run: npm install | ||
|
||
run: | | ||
npm install | ||
npm run tsc | ||
- name: BUILD | ||
run: export NODE_OPTIONS="--max-old-space-size=8120" && export PUBLIC_GITHUB_TOKEN="${{ secrets.GH_PACKAGES_SECRET }}" && npm run build-stage | ||
|
||
run: | | ||
export NODE_OPTIONS="--max-old-space-size=8120" | ||
export PUBLIC_GITHUB_TOKEN="${{ secrets.GH_PACKAGES_SECRET }}" | ||
npm run build-stage | ||
- name: PREPARE TO DEPLOYMENT | ||
run: rm -rf .eslintignore .eslintrc.js .prettierignore .prettierrc .nvmrc .npmrc pnpm-lock.yaml .astro .github node_modules src .editorconfig .gitignore astro.config.ts LICENSE package-lock.json package.json README.md tsconfig.json public plugins cicd .git CODE_OF_CONDUCT.md helpcenter-cleaner.js postcss.config.js | ||
|
||
run: | | ||
rm -rf .eslintignore .eslintrc.js .prettierignore .prettierrc .nvmrc .npmrc pnpm-lock.yaml .astro .github node_modules src .editorconfig .gitignore astro.config.ts LICENSE package-lock.json package.json README.md tsconfig.json public plugins cicd .git CODE_OF_CONDUCT.md helpcenter-cleaner.js postcss.config.js | ||
- name: PREPARE DIST FOLDER | ||
run: mv dist/* ./ && rm -rf dist | ||
|
||
- name: DEPLOYMENT | ||
run: | | ||
mv dist/* ./ | ||
rm -rf dist | ||
- name: PUBLISING | ||
uses: patrickwyler/[email protected] | ||
with: | ||
secrets: ${{ secrets.GCP_EXP_ENG }} | ||
bucket: azdocs-stage | ||
- name: INSTALL gcloud CLI | ||
run: | | ||
apt-get update && apt-get install -y curl apt-transport-https ca-certificates gnupg | ||
curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg | ||
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list | ||
apt-get update && apt-get install -y google-cloud-sdk | ||
- uses: 'google-github-actions/auth@v2' | ||
with: | ||
credentials_json: ${{ secrets.GCP_EXP_ENG }} | ||
- name: UPDATING cache-control header from Google Cloud Storage | ||
run: | | ||
gcloud storage objects update -r gs://azdocs-stage --cache-control="public, max-age=120" | ||