summaryrefslogtreecommitdiff
path: root/.github/workflows/deploy.yaml
blob: 23ba2c861d42d8c42b2a387ee51a5594047a359d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: deploy

on:
  push:
  workflow_dispatch:

jobs:
  ci:
    uses: ./.github/workflows/ci.yaml
    permissions:
      security-events: write

  deploy:
    needs: ci
    runs-on: ubuntu-latest

    permissions:
      deployments: write

    steps:
      - name: download dist
        uses: actions/download-artifact@v3
        with:
          name: dist
          path: dist

      - name: deploy to cloudflare pages
        uses: cloudflare/pages-action@v1
        with:
          apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
          accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
          projectName: teawieapi
          directory: dist
          gitHubToken: ${{ github.token }}