-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Feat/adzep #14497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
+507
−392
Closed
Feat/adzep #14497
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
597ae07
deploy prebid to production
gurodrigues 5ab93e7
check cloudflare response
gurodrigues a3fb7cf
prebid.js headers
gurodrigues 7d8481e
add prebid-full and prebid-no-user-sync
gurodrigues b92e101
clear cloudflare cache
gurodrigues 14ab14f
remove command \
gurodrigues 9166496
rubicon and seedtag adapters
gurodrigues b8114fb
prebid readme
gurodrigues 0d58aac
adzep prebid
gurodrigues File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,65 @@ | ||
| name: Deploy to Production | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build-and-deploy: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
| cache: 'npm' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Build project | ||
| run: | | ||
| gulp build | ||
| gulp bundle --tag prebid-full --modules=modules-full.json | ||
| gulp bundle --tag prebid-no-user-sync --modules=modules-no-user-sync.json | ||
| gulp bundle --tag prebid-adzep --modules=modules-adzep.json | ||
|
|
||
| - name: Upload to S3 Bucket | ||
| run: | | ||
| aws s3 cp build/dist/prebid.prebid-full.js s3://${{ vars.AWS_S3_BUCKET }}/prebid.js \ | ||
| --region ${{ vars.AWS_S3_REGION }} \ | ||
| --content-type "text/javascript; charset=UTF-8" \ | ||
| --cache-control "public, max-age=1800, stale-while-revalidate=3600" \ | ||
| --content-disposition 'attachment; filename="f.txt"' | ||
|
|
||
| aws s3 cp build/dist/prebid.prebid-no-user-sync.js s3://${{ vars.AWS_S3_BUCKET }}/prebid-no-user-sync.js \ | ||
| --region ${{ vars.AWS_S3_REGION }} \ | ||
| --content-type "text/javascript; charset=UTF-8" \ | ||
| --cache-control "public, max-age=1800, stale-while-revalidate=3600" \ | ||
| --content-disposition 'attachment; filename="f.txt"' | ||
|
|
||
| aws s3 cp build/dist/prebid.prebid-adzep.js s3://${{ vars.AWS_S3_BUCKET }}/prebid-adzep.js \ | ||
| --region ${{ vars.AWS_S3_REGION }} \ | ||
| --content-type "text/javascript; charset=UTF-8" \ | ||
| --cache-control "public, max-age=1800, stale-while-revalidate=3600" \ | ||
| --content-disposition 'attachment; filename="f.txt"' | ||
| env: | ||
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
|
|
||
| - name: Purge Cloudflare Cache | ||
| run: | | ||
| response=$(curl -s -X POST "https://api.cloudflare.com/client/v4/zones/${{ vars.CLOUDFLARE_ZONE_ID }}/purge_cache" \ | ||
| -H "Authorization: Bearer ${{ secrets.CLOUDFLARE_API_TOKEN }}" \ | ||
| -H "Content-Type: application/json" \ | ||
| --data '{"files":["https://tag.adpulse.com.br/prebid.js", "https://tag.adpulse.com.br/prebid-no-user-sync.js", "https://tag.adpulse.com.br/prebid-adzep.js"]}') | ||
| echo "$response" | ||
| if ! echo "$response" | grep -q '"success":true'; then | ||
| echo "Cloudflare cache purge failed" | ||
| exit 1 | ||
| fi | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This step invokes
gulpdirectly, but afternpm cithe CLI is only guaranteed undernode_modules/.bin; in a plain GitHub Actionsrunshell that path is not reliably onPATH, so the job can fail withgulp: command not foundbefore any artifacts are built or uploaded. I checked this workflow and compared it with existing repo workflows, which callnpx gulp ...for the same reason.Useful? React with 👍 / 👎.