Skip to content

Commit d7e066c

Browse files
committed
Deploy during manual forecast runs
1 parent a8085e9 commit d7e066c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/forecast-request.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,27 @@ jobs:
8686
sleep $((RANDOM % 5 + 2))
8787
done
8888
89+
- name: Setup Node for site build
90+
uses: actions/setup-node@v4
91+
with:
92+
node-version: 20
93+
cache: npm
94+
cache-dependency-path: site/package-lock.json
95+
96+
- name: Build Astro site
97+
working-directory: site
98+
run: |
99+
npm ci
100+
npm run build
101+
102+
- name: Deploy to Cloudflare Pages
103+
uses: cloudflare/wrangler-action@v3
104+
with:
105+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
106+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
107+
workingDirectory: site
108+
command: pages deploy dist --project-name forecastingapi --branch main
109+
89110
deploy:
90111
if: github.event_name == 'push'
91112
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)