Skip to content

Commit

Permalink
fix deployment job
Browse files Browse the repository at this point in the history
  • Loading branch information
alpancs committed Oct 2, 2024
1 parent 4c1f22e commit 03384c2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Deploy to Cloudflare Pages

on:
push:
workflow_dispatch:
on: [push]

concurrency:
group: deployment-${{ github.ref }}
Expand All @@ -12,16 +10,17 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: extractions/setup-just@v2
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
profile: minimal
- run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- uses: extractions/setup-just@v2
- uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
wranglerVersion: "3.79.0"
- run: just deploy
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
preCommands: just prepare-deployment
command: pages deploy web-app/public --project-name=quranize
8 changes: 5 additions & 3 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ run-server:
--cache-control-headers=false \
--log-level=info

deploy: build-wasm get-fontawesome
wget https://cdn.jsdelivr.net/npm/vue@{{vue_version}}/dist/vue.esm-browser.prod.js -O {{public_dir}}/scripts/vue.esm-browser.js
wget https://cdn.jsdelivr.net/npm/bulma@{{bulma_version}}/css/bulma.min.css -O {{public_dir}}/styles/bulma.css
deploy: prepare-deployment
wrangler pages deploy {{public_dir}} --project-name=quranize
just get-vue get-bulma 2> /dev/null

prepare-deployment: build-wasm get-fontawesome
wget https://cdn.jsdelivr.net/npm/vue@{{vue_version}}/dist/vue.esm-browser.prod.js -O {{public_dir}}/scripts/vue.esm-browser.js
wget https://cdn.jsdelivr.net/npm/bulma@{{bulma_version}}/css/bulma.min.css -O {{public_dir}}/styles/bulma.css

0 comments on commit 03384c2

Please sign in to comment.