Feature/fix deletion bug (#19) #16
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
name: Build and publish to cloud flare pages | |
env: | |
PROJECT_NAME: "graph-algorithm" | |
ACCOUNT_ID: "438fa90d47933c5f0f94c0bfeefe076d" | |
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
push-image-to-docker-hub: | |
name: Build and Publish to Cloud Flare Pages | |
permissions: | |
contents: read | |
deployments: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Configures node js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name : Configures rust and cargo | |
run: | | |
curl https://sh.rustup.rs -sSf | sh -s -- -y | |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -y | |
- name: Build Wasm Library | |
run: wasm-pack build --target web | |
working-directory: ./wasm-lib | |
- name: Build Website | |
working-directory: ./website | |
run: | | |
npm install | |
npm run build | |
- name: Publish to Cloudflare Pages | |
uses: cloudflare/pages-action@v1 | |
with: | |
accountId: ${{ env.ACCOUNT_ID }} | |
projectName: ${{ env.PROJECT_NAME }} | |
apiToken: ${{ env.CLOUDFLARE_API_TOKEN }} | |
directory: ./website/out | |
# Optional: Change the Wrangler version, allows you to point to a specific version or a tag such as `beta` | |
wranglerVersion: '3' |