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

feat: add React rendering build-step #34

Merged
merged 6 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
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
10 changes: 6 additions & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:

jobs:
Preview:
environment:
name: Preview
url: ${{ steps.deployment.outputs.deployment-url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -23,11 +26,10 @@ jobs:
- if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: npm ci
- run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
- run: npm run build
- id: deployment
uses: cloudflare/pages-action@v1
uses: cloudflare/wrangler-action@v3
with:
accountId: ${{ secrets.CF_ACCOUNT_ID }}
apiToken: ${{ secrets.CF_API_TOKEN }}
directory: public
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
projectName: iiro
command: pages deploy --project-name=iiro
11 changes: 6 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ concurrency: production_deployment

jobs:
Deploy:
environment:
name: Production
url: https://iiro.fi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -25,11 +28,9 @@ jobs:
${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
- if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: npm ci
- uses: cloudflare/pages-action@v1
- run: npm run build
- uses: cloudflare/wrangler-action@v3
with:
accountId: ${{ secrets.CF_ACCOUNT_ID }}
apiToken: ${{ secrets.CF_API_TOKEN }}
branch: main
directory: public
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
projectName: iiro
command: pages deploy --project-name=iiro --branch=main
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.vscode
.wrangler
public/**/*.html
node_modules
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.wrangler
_headers
public/**/*.html
Loading