-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial commit of updating worker to support /posts endpoint * Working backend api * working on switching the frontend to use more network calls to load only the data that it needs * Updating the frontend to request only the data it needs * working on getting the network_dynamic backend to play nicely. Running into a CORS issue * Fixing the CORS issue * We have a working local dynamic network! * Finally found the option to allow for direct path navigation! * Adding k6 test to CI * fix action with actionlint * fix buildPosts * Switching to true SPA mode (sigh of relief). SPAs are how my brain work * Fixing the directory issue with the backend deployments * Add the checkout step 🤦 * 🤦 fixing the version of k6
- Loading branch information
1 parent
e34d364
commit 49e9d1b
Showing
19 changed files
with
399 additions
and
133 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ jobs: | |
outputs: | ||
frontend-changed: ${{ steps.changes.outputs.frontend-changed }} | ||
data-changed: ${{ steps.changes.outputs.data-changed }} | ||
backend-changed: ${{ steps.changes.outputs.backend-changed }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
@@ -24,6 +25,7 @@ jobs: | |
run: | | ||
FRONTEND_DIFF=$(git diff --name-only origin/main -- frontend/* | wc -l | xargs) | ||
DATA_DIFF=$(git diff --name-only origin/main -- data/* | wc -l | xargs) | ||
BACKEND_DIFF=$(git diff --name-only origin/main -- backend/* | wc -l | xargs) | ||
if [[ "$FRONTEND_DIFF" == "1" ]]; then | ||
echo "frontend-changed=true" >> $GITHUB_OUTPUT | ||
|
@@ -33,6 +35,10 @@ jobs: | |
echo "data-changed=true" >> $GITHUB_OUTPUT | ||
fi | ||
if [[ "$BACKEND_DIFF" == "1" ]]; then | ||
echo "backend-changed=true" >> $GITHUB_OUTPUT | ||
fi | ||
build-frontend: | ||
name: Build Frontend | ||
|
@@ -103,3 +109,21 @@ jobs: | |
apiToken: ${{ secrets.CF_API_KEY }} | ||
accountId: ${{ secrets.CF_ACCOUNT }} | ||
command: r2 object put flinnlab-blog/rss.xml --file ./data/rss.xml | ||
|
||
|
||
deploy-backend: | ||
name: Deploy Backend | ||
if: ${{ needs.setup.outputs.backend-changed == 'true' }} | ||
needs: [setup] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Deploy Backend | ||
uses: cloudflare/[email protected] | ||
with: | ||
apiToken: ${{ secrets.CF_API_KEY }} | ||
accountId: ${{ secrets.CF_ACCOUNT }} | ||
workingDirectory: backend | ||
command: deploy --env production |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,3 +36,24 @@ jobs: | |
run: | | ||
npm run build:posts | ||
npm run build:rss | ||
test-backend: | ||
name: Deploy & Test Backend | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Deploy backend | ||
uses: cloudflare/[email protected] | ||
with: | ||
apiToken: ${{ secrets.CF_API_KEY }} | ||
accountId: ${{ secrets.CF_ACCOUNT }} | ||
workingDirectory: backend | ||
command: deploy --env staging | ||
|
||
- name: Run Integration Tests | ||
uses: grafana/[email protected] | ||
with: | ||
filename: backend/test/script.js |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.