Skip to content

Update site

Update site #8810

Workflow file for this run

name: Update site
on:
workflow_dispatch:
schedule:
- cron: '0 * * * *'
push:
branches:
- main
permissions:
contents: write
jobs:
webhook:
runs-on: ubuntu-latest
steps:
- name: Setup Groovy
uses: wtfjoke/setup-groovy@v1
with:
groovy-version: '4.0.18'
- name: Generate an Application repository access token
id: gen_repo_token
uses: kattecon/gh-app-access-token-gen@v1
with:
app_id: 376723
private_key: ${{ secrets.APPLICATION_KEY }}
installation_id: 40772190
- name: Checkout repository
uses: actions/checkout@main
- name: Set git username
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: Update repositories JSON
run: groovy .github/workflows/scripts/update_repos.groovy
env:
AUTH_TOKEN: ${{ steps.gen_repo_token.outputs.token }}
- uses: actions/setup-node@v3
name: Setup Node
with:
node-version: 20
cache: 'npm'
- name: Install deps
run: npm install
- name: Build site
run: npm run build
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_PAGES_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: 'project-listing-v2'
directory: dist
# Enable Wrangler v3
wranglerVersion: '3'