新增112學測解答 #11
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
# https://github.com/andykenward/github-actions-cloudflare-pages | |
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
name: 'Deployment' | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'website/**' | |
jobs: | |
deploy: | |
permissions: | |
contents: read | |
deployments: write | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Deploy to Cloudflare Pages | |
uses: andykenward/github-actions-cloudflare-pages@v2.1.0 | |
id: pages | |
with: | |
cloudflare-api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
cloudflare-account-id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
cloudflare-project-name: tw-anscheck | |
directory: website | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
github-environment: ${{ (github.ref == 'refs/heads/main' && 'Production') || 'Preview' }} |