Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 25 additions & 11 deletions .github/workflows/deploy-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
|| (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
environment:
name: Preview
url: ${{ steps.vercel-action.outputs.preview-url }}
url: ${{ steps.deploy.outputs.pages-deployment-alias-url || steps.deploy.outputs.deployment-url }}
permissions:
pull-requests: write
steps:
Expand All @@ -47,6 +47,7 @@ jobs:
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "24"
package-manager-cache: false

- name: Build Assets
run: npm ci && npm run prod
Expand All @@ -61,14 +62,27 @@ jobs:
run: npx hugo --buildDrafts --buildFuture --logLevel info

- name: Deploy
uses: amondnet/vercel-action@de09aeac2ace6599ec9b11ef87558759a496bac4 # v42.3.0
id: vercel-action
uses: cloudflare/wrangler-action@953926a2e2182532811c01a25e53647d93bf07c0 # v4.1.3
id: deploy
with:
vercel-version: 50.44.0
vercel-token: ${{ secrets.VERCEL_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
scope: python-poetry
github-comment: true
working-directory: public
wranglerVersion: "4.152.0"
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy public --project-name=python-poetry --branch=pr-${{ github.event.pull_request.number }} --commit-hash=${{ github.event.pull_request.head.sha }} --commit-dirty=true

- name: Comment Preview URL
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
PR_NUMBER: ${{ github.event.pull_request.number }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
ALIAS_URL: ${{ steps.deploy.outputs.pages-deployment-alias-url }}
DEPLOYMENT_URL: ${{ steps.deploy.outputs.deployment-url }}
run: |
gh pr comment "$PR_NUMBER" --edit-last --create-if-none --body "$(cat <<BODY
Deploy preview for ${HEAD_SHA}:

- Latest: ${ALIAS_URL:-$DEPLOYMENT_URL}
- This commit: ${DEPLOYMENT_URL}
BODY
)"
27 changes: 13 additions & 14 deletions .github/workflows/deploy-production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
timeout-minutes: 15
environment:
name: Production
url: ${{ steps.vercel-action.outputs.preview-url }}
url: https://python-poetry.org
permissions:
pull-requests: write
contents: read

steps:
- name: Checkout
Expand All @@ -36,6 +36,7 @@ jobs:
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "24"
package-manager-cache: false

- name: Build Assets
run: npm ci && npm run prod
Expand All @@ -47,7 +48,10 @@ jobs:
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
with:
ruby-version: "3.2"
bundler-cache: true
bundler-cache: false

- name: Install Ruby dependencies
run: bundle install

- name: Fetch Documentation
run: |
Expand All @@ -70,15 +74,10 @@ jobs:
npm run algolia

- name: Deploy
uses: amondnet/vercel-action@de09aeac2ace6599ec9b11ef87558759a496bac4 # v42.3.0
id: vercel-action
uses: cloudflare/wrangler-action@953926a2e2182532811c01a25e53647d93bf07c0 # v4.1.3
id: deploy
with:
vercel-version: 50.44.0
vercel-token: ${{ secrets.VERCEL_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
scope: python-poetry
github-comment: false
vercel-args: "--prod"
working-directory: public
wranglerVersion: "4.152.0"
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy public --project-name=python-poetry --branch=main --commit-dirty=true
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ assets/assets
.vscode
.idea

.vercel
.env
algolia.json
.hugo_build.lock
Expand Down
19 changes: 0 additions & 19 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,25 +186,6 @@ <h2 id="footerHeading" class="sr-only">Footer</h2>
>Copyright &copy; 2018-{{ now.Format "2006" }}. All Rights
Reserved.</span
>
<span class="flex items-center justify-start md:justify-center">
Powered by
<a
href="https://vercel.com?utm_source=python-poetry&utm_campaign=oss"
title="Go to the Vercel website"
class="vercel-footer-link"
>
<svg
viewBox="0 0 4438 1000"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M2223.75 250C2051.25 250 1926.87 362.5 1926.87 531.25C1926.87 700 2066.72 812.5 2239.38 812.5C2343.59 812.5 2435.47 771.25 2492.34 701.719L2372.81 632.656C2341.25 667.188 2293.28 687.344 2239.38 687.344C2164.53 687.344 2100.94 648.281 2077.34 585.781H2515.16C2518.59 568.281 2520.63 550.156 2520.63 531.094C2520.63 362.5 2396.41 250 2223.75 250ZM2076.09 476.562C2095.62 414.219 2149.06 375 2223.75 375C2298.59 375 2352.03 414.219 2371.41 476.562H2076.09ZM2040.78 78.125L1607.81 828.125L1174.69 78.125H1337.03L1607.66 546.875L1878.28 78.125H2040.78ZM577.344 0L1154.69 1000H0L577.344 0ZM3148.75 531.25C3148.75 625 3210 687.5 3305 687.5C3369.38 687.5 3417.66 658.281 3442.5 610.625L3562.5 679.844C3512.81 762.656 3419.69 812.5 3305 812.5C3132.34 812.5 3008.13 700 3008.13 531.25C3008.13 362.5 3132.5 250 3305 250C3419.69 250 3512.66 299.844 3562.5 382.656L3442.5 451.875C3417.66 404.219 3369.38 375 3305 375C3210.16 375 3148.75 437.5 3148.75 531.25ZM4437.5 78.125V796.875H4296.88V78.125H4437.5ZM3906.25 250C3733.75 250 3609.38 362.5 3609.38 531.25C3609.38 700 3749.38 812.5 3921.88 812.5C4026.09 812.5 4117.97 771.25 4174.84 701.719L4055.31 632.656C4023.75 667.188 3975.78 687.344 3921.88 687.344C3847.03 687.344 3783.44 648.281 3759.84 585.781H4197.66C4201.09 568.281 4203.12 550.156 4203.12 531.094C4203.12 362.5 4078.91 250 3906.25 250ZM3758.59 476.562C3778.13 414.219 3831.41 375 3906.25 375C3981.09 375 4034.53 414.219 4053.91 476.562H3758.59ZM2961.25 265.625V417.031C2945.63 412.5 2929.06 409.375 2911.25 409.375C2820.47 409.375 2755 471.875 2755 565.625V796.875H2614.38V265.625H2755V409.375C2755 330 2847.34 265.625 2961.25 265.625Z"
fill="currentColor"
/>
</svg>
</a>
</span>
</p>
</div>
</div>
Expand Down
Loading
Loading