-
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.
- Loading branch information
Showing
5 changed files
with
178 additions
and
23 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 |
---|---|---|
@@ -0,0 +1,111 @@ | ||
name: build | ||
run-name: build check | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- release | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
node-version: [20] | ||
defaults: | ||
run: | ||
working-directory: remix | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/action-setup@v3 | ||
with: | ||
version: 9 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'pnpm' | ||
cache-dependency-path: remix | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
# チェック実行 | ||
# - name: vitest | ||
# run: pnpm test:ci | ||
# - name: lint | ||
# run: pnpm lint:ci | ||
- name: build check | ||
run: pnpm build | ||
|
||
# visual-regression-testing: | ||
# needs: changes | ||
# if: ${{ needs.changes.outputs.is_frontend == 'true' }} | ||
# runs-on: ubuntu-22.04 | ||
# defaults: | ||
# run: | ||
# working-directory: packages/frontend | ||
# steps: | ||
# # リポジトリをチェックアウト | ||
# - uses: actions/checkout@v3 | ||
# # TODO: github action 内のdocker build でキャッシュしたい https://github.com/stlatica/stlatica/issues/286 | ||
# - name: build container image | ||
# run: make util/build | ||
# - name: pull lfs snapshots | ||
# run: git lfs pull | ||
# - name: Run vrt tests in container | ||
# run: make vrt | ||
# timeout-minutes: 2 | ||
|
||
|
||
# deploy: | ||
|
||
# # 同時にビルドが走った際に、先のビルドを優先 | ||
# concurrency: | ||
# group: 'pages' | ||
# cancel-in-progress: true | ||
# # main でのみ実行 | ||
# if: ${{github.ref == 'refs/heads/main'}} | ||
# environment: | ||
# name: github-pages | ||
# url: ${{ steps.deployment.outputs.page_url }} | ||
# runs-on: ubuntu-22.04 | ||
# defaults: | ||
# run: | ||
# working-directory: packages/frontend/remix | ||
# steps: | ||
# # リポジトリをチェックアウト | ||
# - uses: actions/checkout@v3 | ||
# with: | ||
# ref: ${{ github.head_ref }} | ||
# # pnpm 8をインストール | ||
# - uses: pnpm/action-setup@v2 | ||
# with: | ||
# version: 9 | ||
|
||
# # node.jsをインストール | ||
# - name: Node.js | ||
# uses: actions/setup-node@v3 | ||
# with: | ||
# cache: 'pnpm' | ||
# cache-dependency-path: packages/frontend/remix | ||
|
||
# # 依存関係先をインストール | ||
# - name: Install dependencies | ||
# run: pnpm install --frozen-lockfile | ||
|
||
# # コンポーネントカタログをビルド (2回目) | ||
# - name: catalog build | ||
# run: pnpm ladle:ci | ||
|
||
# - name: Setup Pages | ||
# uses: actions/configure-pages@v3 | ||
# - name: Upload artifact | ||
# uses: actions/upload-pages-artifact@v1 | ||
# with: | ||
# # リポジトリのアップロード | ||
# path: './packages/frontend/remix/ladle-build' | ||
# - name: Deploy to GitHub Pages | ||
# id: deployment | ||
# uses: actions/deploy-pages@v1 |
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: deploy | ||
run-name: deploy to cloudflare | ||
|
||
on: | ||
push: | ||
branches: | ||
# - main | ||
- release | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
contents: read | ||
deployments: write | ||
name: Deploy to Cloudflare Pages | ||
defaults: | ||
run: | ||
working-directory: remix | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
# setup env | ||
- uses: pnpm/action-setup@v3 | ||
with: | ||
version: 9 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'pnpm' | ||
# builds | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
- name: build | ||
run: pnpm build | ||
|
||
- name: Publish | ||
uses: cloudflare/pages-action@1 | ||
with: | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
projectName: portfolio # e.g. 'my-project' | ||
directory: remix/build/client # e.g. 'dist' | ||
gitHubToken: ${{ secrets.GITHUB_TOKEN }} |
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
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
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