Merge pull request #563 from AliciaBytes/renovate/cloudflare-wrangler… #504
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
name: deploy | |
on: | |
push: | |
branches: | |
- main | |
env: | |
DOMAIN: www.aliciabytes.com | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: write | |
statuses: write | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Setup IndexNow | |
# Generate files dynamically to prevent them from being leaked in public repositories. | |
# This example will put the file in the root directory of the site.You may change the location by yourself. | |
run: echo ${{ secrets.INDEXNOW_KEY }} > public/${{ secrets.INDEXNOW_KEY }}.txt | |
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4 | |
with: | |
node-version: "lts/*" | |
cache: "npm" | |
- name: Install Dependencies | |
run: npm install | |
- name: Download Images | |
run: utils/download-images.sh | |
- name: Build the website | |
run: npm run build | |
- name: Deploy to Cloudflare pages | |
uses: cloudflare/wrangler-action@39c2b5a1226e5718f92a2749a8988cce31e78a76 # v3 | |
with: | |
accountId: ${{ secrets.CF_ACCOUNT_ID }} | |
apiToken: ${{ secrets.CF_API_TOKEN }} | |
command: pages deploy dist --project-name=aliciabytes-com | |
timeout-minutes: 5 | |
- name: Submit sitemap to google | |
run: curl -X GET https://www.google.com/ping?sitemap=https://${{ env.DOMAIN }}/sitemap-index.xml | |
- name: Send urls to indexnow | |
uses: bojieyang/indexnow-action@99fa50cf58d1ee519945b7db8ae71b0e60303ad7 # v2 | |
with: | |
sitemap-location: "https://www.aliciabytes.com/sitemap-index.xml" | |
key: ${{ secrets.INDEXNOW_KEY }} | |
endpoint: "api.indexnow.org" | |
timeout: 50000 | |
limit: 1000 | |
failure-strategy: "error" |