This repository has been archived by the owner on Jun 23, 2024. It is now read-only.
Periodically build application #318
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: Periodically build application | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
deploy-to-cloudflare: | |
name: Deploy to Cloudflare | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
deployments: write | |
concurrency: | |
group: deploy-to-cloudflare | |
env: | |
GIT_HUB_API_BASE_URL: ${{ secrets.GIT_HUB_API_BASE_URL }} | |
GIT_HUB_API_TOKEN: ${{ secrets.GIT_HUB_API_TOKEN }} | |
GIT_HUB_LOGIN: ${{ secrets.GIT_HUB_LOGIN }} | |
steps: | |
- name: Checkout code | |
uses: nschloe/action-cached-lfs-checkout@v1 | |
- name: Setup Node.js | |
uses: ./.github/actions/setup-nodejs | |
- name: Build website | |
run: npm run build | |
- name: Publish to Cloudflare Pages | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }} | |
directory: ./target/dist | |
wranglerVersion: "3" |