Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy to Cloudflare Page #6

Merged
merged 3 commits into from
Oct 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/frontend_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
on:
push:
branches:
- main
name: Frontend Deploy
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Deploy to Cloudflare Pages
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
- name: Generate Undeads Json
run: cargo run && cp ./undeads.json ../frontend/
working-directory: ./runtime
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: bahmutov/npm-install@v1
with:
useLockFile: true
working-directory: ./frontend
- name: Build Check
run: yarn build
working-directory: ./frontend
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: 3a49159509ead63f611cec6e748eea47
projectName: valhalla
directory: ./frontend/dist
branch: main