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 test env #408

Merged
merged 2 commits into from
Feb 15, 2024
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
32 changes: 32 additions & 0 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy to dev Cloudflare Worker
Aprillion marked this conversation as resolved.
Show resolved Hide resolved
on:
workflow_dispatch:
pull_request:
branches:
- stampy-redesign
types:
- closed
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
jobs:
deploy:
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Clone stampy-ui repository code
uses: actions/checkout@v3
- name: Deploy to Cloudflare
run: |
cat wrangler.toml.template \
| sed s/stampy-ui/redesign/ \
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this suffice for it to not overwrite the current page?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no idea 🤷

Copy link
Collaborator

@Aprillion Aprillion Feb 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but I created 2 new GH secrets if you want to replace next 2 lines to be on the safe side 😅

then you can try that https://stampy-ui.aprillion.workers.dev/ is the version from my manual deploy last week vs https://redesign.aprillion.workers.dev/ would be created from this action (feel free to add some version indicator, e.g. console log git commit date or something, if it would be hard to spot a difference)

CLOUDFLARE_ACCT_ID_APRILLION_WORKERS_DEV
STAMPY_KV_ID_APRILLION_WORKERS_DEV

let me know if there are more steps to enable something somewhere to allow deploy from GH action in my CF account that I forgot about

| sed s/{CLOUDFLARE_ACCT_ID}/${{ secrets.CLOUDFLARE_ACCT_ID_APRILLION_WORKERS_DEV }}/ \
| sed s/{STAMPY_KV_ID}/${{ secrets.STAMPY_KV_ID_APRILLION_WORKERS_DEV }}/ \
| sed s/{CODA_TOKEN}/${{ secrets.CODA_TOKEN }}/ \
| sed s/{CODA_INCOMING_TOKEN}/${{ secrets.CODA_INCOMING_TOKEN }}/ \
| sed s/{CODA_WRITES_TOKEN}/${{ secrets.CODA_WRITES_TOKEN }}/ \
| sed s/{GOOGLE_ANALYTICS_ID}/${{ secrets.GOOGLE_ANALYTICS_ID }}/ \
> wrangler.toml
npm ci
npm run deploy
- name: 'Debug: list files in build directory'
run: ls -R build public/build
Loading